<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dotnet thoughts &#187; Combobox</title>
	<atom:link href="http://www.dotnetthoughts.net/tag/combobox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotnetthoughts.net</link>
	<description>a dotnet developer&#039;s technical blog</description>
	<lastBuildDate>Wed, 08 Feb 2012 03:18:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Clearing combobox items using javascript</title>
		<link>http://www.dotnetthoughts.net/2007/05/23/clearing-combobox-items-using-javascript/</link>
		<comments>http://www.dotnetthoughts.net/2007/05/23/clearing-combobox-items-using-javascript/#comments</comments>
		<pubDate>Wed, 23 May 2007 04:57:11 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Combobox]]></category>
		<category><![CDATA[Dropdown]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://anuraj.wordpress.com/2007/05/23/clearing-combobox-items-using-javascript/</guid>
		<description><![CDATA[I already posted some code to add and read values from dropdown lists using Javascript. Sometimes we require to reset the items to zero or need to clear the items in the dropdown list. Here is a simple code snippet &#8230; <a href="http://www.dotnetthoughts.net/2007/05/23/clearing-combobox-items-using-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I already <a href="http://www.dotnetthoughts.net/2007/05/11/adding-and-reading-values-from-combo-box-using-javascript/">posted</a> some code to add and read values from dropdown lists using Javascript. Sometimes we require to reset the items to zero or need to clear the items in the dropdown list. Here is a simple code snippet which will reset the dropdown items.</p>
<pre class="brush: jscript; title: ; notranslate">
function clearDropdown(dropdown)
{
var mycombo =document.getElementById(dropdown);
mycombo.options.length = 0;
return(false);
}
</pre>
<p>And you can use this function like this</p>
<pre class="brush: xml; title: ; notranslate">
&lt;button onclick=&quot;javascript:clearDropdown('myoptions')&quot;&gt;Reset Options&lt;/button&gt;
</pre>
<p>Where myoptions is the dropdown to clear.</p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2007/05/11/adding-and-reading-values-from-combo-box-using-javascript/" title="Permanent link to Adding and reading values from combo box using Javascript">Adding and reading values from combo box using Javascript</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2007/05/23/clearing-combobox-items-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

