<?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>Dot Net 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>thoughts about .Net, WPF, Sharepoint, Javascript and more.</description>
	<lastBuildDate>Wed, 01 Sep 2010 09:53:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.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 which will reset the dropdown items. function clearDropdown(dropdown) { var mycombo =document.getElementById(dropdown); mycombo.options.length = 0; [...]]]></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;">
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;">
&lt;button onclick=&quot;javascript:clearDropdown('myoptions')&quot;&gt;Reset Options&lt;/button&gt;
</pre>
<p>Where myoptions is the dropdown to clear.</p>
]]></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>
