<html>
<link rel="stylesheet" href="josh.css">
<body bgcolor="#FFFFFF">

		<div id="Description">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">options</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">2</span> IE <span class="emphasis">3</span> DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>An array of <span class="literal">option</span> elements nested within a
<span class="literal">select</span> object.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectmodelreference"><span class="title">Object Model Reference</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>[window.]document.<span class="replaceable">formName</span>.<span class="replaceable">selectName</span>.options
[window.]document.forms[i].elements[i].options
[window.]document.getElementById("<span class="replaceable">selectElementID</span>").options</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificproperties"><span class="title">Object-Specific Properties</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<table border="1"><tbody><tr><td><span class="literal">length</span></td>
								</tr>
							</tbody></table>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificmethods"><span class="title">Object-Specific Methods</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<table border="1"><tbody><tr><td><span class="literal">add( )</span></td><td><span class="literal">item( )</span></td><td><span class="literal">namedItem( )</span></td><td><span class="literal">remove( )</span></td><td><span class="literal">tags( )</span></td><td><span class="literal">urns( )</span></td>
								</tr>
							</tbody></table>
					</td>
				</tr>
			</table>
		</div><div id="length">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">length</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">2</span> IE <span class="emphasis">3</span> DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">Read-only&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns the number of elements in the collection.</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="example"><span class="title">Example</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>var howMany = document.forms[0].mySelect.options.length;</pre>
						</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="value"><span class="title">Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Integer. </p>
					</td>
				</tr>
			</table>
		</div><div id="add( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">add( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">add(<span class="replaceable">elementRef</span>[,
<span class="replaceable">index</span>])</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Adds an already-created element (from the <span class="literal">createElement(
)</span> method) to the current collection. The element must be of
the <span class="literal">option</span> type. By default, the new element is
added as the last item of the collection unless you specify an index
value as a second parameter (in which case all existing items from
that index position get pushed down by one). The following example
sequence appends a new item to a <span class="literal">select</span> object:
</p>
<span class="PROGRAMLISTING"><pre>var newElem = document.createElement(&quot;option&quot;);
newElem.text = &quot;Freddy&quot;;
newElem.value = &quot;Freddy Mercury&quot;;
document.forms[1].rockers.options.add(newElem);</pre></span>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			Notice that a generic object is created first. Then its properties
are stuffed with values, and the new element is added to the
<span class="literal">select</span> element.
</p>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			For an example of a cross-browser and backward-compatible approach to
this task, see the <span class="literal">option</span> object discussion. Also
see the <span class="literal">select.add( )</span> method for a W3C DOM
approach that works with Netscape 6.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>A fully-formed element object reference, usually generated by the
<span class="literal">createElement( )</span> method.
</li><li><span class="literal"></span>An optional integer indicating where in the collection the new
element should be placed.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None.</p>
					</td>
				</tr>
			</table>
		</div><div id="item( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">item( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">item(<span class="replaceable">index</span>[, <span class="replaceable">subindex</span>])
item(<span class="replaceable">index</span>)</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a single object or collection of objects corresponding to the
element matching the index value (or, optionally, the index and
subindex values).
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>When the parameter is a zero-based integer, the returned value is a
single element corresponding to the specified item in source code
order (nested within the current element); when the parameter is a
string (IE only), the returned value is a collection of elements with
<span class="literal">id</span> properties that match that string.
</li><li><span class="literal"></span>In IE only, if you specify a string value for the first parameter,
you can use the second parameter to specify a zero-based index that
retrieves the specified element from the collection with
<span class="literal">id</span> properties that match the first
parameter's string value.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			One object or collection (array) of objects. If there are no matches
to the parameters, the returned value is <span class="literal">null</span>.
</p>
					</td>
				</tr>
			</table>
		</div><div id="namedItem( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">namedItem( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">6</span> DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">namedItem("<span class="replaceable">ID</span>")</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a single <span class="literal">option</span> object corresponding to
the element matching the parameter string value.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>The string that contains the same value as the desired
element's <span class="literal">id</span> attribute.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			One <span class="literal">option</span> object. If there are no matches to the
parameters, the returned value is <span class="literal">null</span>.
</p>
					</td>
				</tr>
			</table>
		</div><div id="remove( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">remove( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">remove(<span class="replaceable">index</span>)</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Deletes an element from the current collection. Simply specify the
zero-based index value of the <span class="literal">option</span> element you
wish to remove from the collection belonging to a
<span class="literal">select</span> element. The following example deletes the
first item from a <span class="literal">select</span> object:
</p>
<span class="PROGRAMLISTING"><pre>document.forms[1].rockers.options.remove(0);</pre></span>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			The process for removing an <span class="literal">option</span> element is
entirely different in Navigator. To delete an item, assign
<span class="literal">null</span> to the item in the collection. For example,
the Navigator version of the preceding IE example is as follows:
</p>
<span class="PROGRAMLISTING"><pre>document.forms[1].rockers.options[0] = null;</pre></span>
							</td>
						</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
						<tr>
							<td colspan="2"><p>			Regardless of the browser-specific process of removing an option from
the <span class="literal">select</span> object, the length of the
<span class="literal">options</span> array collapses to fill the space.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>A zero-based integer indicating which item in the collection should
be deleted.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None.</p>
					</td>
				</tr>
			</table>
		</div><div id="tags( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">tags( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">4</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">tags("<span class="replaceable">tagName</span>")</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a collection of objects (among all objects nested within the
current collection) with tags that match the
<span class="replaceable">tagName</span> parameter. Implemented in all IE
collections (see the <span class="literal">all.tags( )</span> method), but
redundant for collections of the same element type.
</p>
												</td>
</tr>
			</table>
		</div><div id="urns( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">urns( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">n/a</span> IE <span class="emphasis">5(Win)</span> DOM <span class="emphasis">n/a</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">urns(<span class="replaceable">URN</span>)</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>See the <span class="literal">all.urns( )</span> method.</p>
												</td>
</tr>
			</table>
		</div>

</body>
</html>