Here's how I do it:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (drpBox.length){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drpBox.remove(0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>Milo<br><br><div><span class="gmail_quote">On 2/1/06, <b class="gmail_sendername">Andrew Crawford</b> &lt;<a href="mailto:javascript@evermore.com">
javascript@evermore.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">It works in Firefox, Opera, and Safari, too.<br>
<br>I'm curious whether there is a good reason not to do it this way<br>(setting length to 0).<br><br>Andrew Crawford<br><br>James Conley wrote:<br>&gt; Oddly enough this works in IE - does it work in other browsers as well?
<br>&gt; Normally .length is read-only for arrays and such.<br>&gt;<br>&gt;<br>&gt; james c<br>&gt;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt; *From:* <a href="mailto:javascript-bounces@LaTech.edu">
javascript-bounces@LaTech.edu</a><br>&gt; [mailto:<a href="mailto:javascript-bounces@LaTech.edu">javascript-bounces@LaTech.edu</a>] *On Behalf Of *Peter Brunone<br>&gt; *Sent:* Wednesday, February 01, 2006 10:53 AM<br>&gt; *To:* 
<a href="mailto:javascript@LaTech.edu">javascript@LaTech.edu</a><br>&gt; *Subject:* Re: [Javascript] deleting all options<br>&gt;<br>&gt; Can you still set options.length = 0?<br>&gt;<br>&gt; Also, innerHTML = &quot;&quot; comes to mind (this might possibly be fastest,
<br>&gt; though not supported by earlier browsers)...<br>&gt;<br>&gt; Peter<br>&gt;<br>&gt; *From*: &quot;Nick Fitzsimons&quot; <a href="mailto:nick@nickfitz.co.uk">nick@nickfitz.co.uk</a> &lt;mailto:<a href="mailto:nick@nickfitz.co.uk">
nick@nickfitz.co.uk</a>&gt;<br>&gt;<br>&gt;&gt; i dynamically fill a .<br>&gt;&gt; when i do it twice the first created options still are in the new select.<br>&gt;&gt;<br>&gt;&gt; now i need ans easy function to clear the
<br>&gt; you can use<br>&gt;<br>&gt; // get reference to element<br>&gt; var element = document.getElementById(&quot;mySelect&quot;);<br>&gt; // remove all children of element<br>&gt; while (element.firstChild) {<br>&gt; 
element.removeChild(element.firstChild);<br>&gt; }<br>&gt;<br>&gt; As you presumably already have a variable reference to the select, adjust<br>&gt; accordingly.<br>&gt;<br>&gt; The while loop there is a general purpose way of removing all the child
<br>&gt; nodes of any element, so depending on your needs, you may find it useful<br>&gt; to move it into a function.<br>&gt;<br>&gt; HTH,<br>&gt;<br>&gt; Nick.<br>&gt; --<br>&gt; Nick Fitzsimons<br>&gt; <a href="http://www.nickfitz.co.uk/">
http://www.nickfitz.co.uk/</a><br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; Javascript mailing list
<br>&gt; <a href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</a><br>&gt; <a href="https://lists.LaTech.edu/mailman/listinfo/javascript">https://lists.LaTech.edu/mailman/listinfo/javascript</a><br>_______________________________________________
<br>Javascript mailing list<br><a href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</a><br><a href="https://lists.LaTech.edu/mailman/listinfo/javascript">https://lists.LaTech.edu/mailman/listinfo/javascript</a><br>
</blockquote></div><br>