<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Adding Options to a Select&#160;Element</title>
	<atom:link href="http://particletree.com/notebook/adding-options-to-a-select-element/feed/" rel="self" type="application/rss+xml" />
	<link>http://particletree.com/notebook/adding-options-to-a-select-element/</link>
	<description>Everyone needs a hug.</description>
	<lastBuildDate>Mon, 16 Nov 2009 21:43:07 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tom Stewart</title>
		<link>http://particletree.com/notebook/adding-options-to-a-select-element/comment-page-1/#comment-21917</link>
		<dc:creator>Tom Stewart</dc:creator>
		<pubDate>Sun, 22 Jul 2007 22:22:18 +0000</pubDate>
		<guid isPermaLink="false">http://particletree.com/notebook/adding-options-to-a-select-element/#comment-21917</guid>
		<description>&lt;p&gt;Why not simply use Prototype&#039;s Ajax.Updater() and [re]load a complete SELECT options list all at once into a DIV tag set?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Why not simply use Prototype&#8217;s Ajax.Updater() and [re]load a complete SELECT options list all at once into a DIV tag set?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Subbu</title>
		<link>http://particletree.com/notebook/adding-options-to-a-select-element/comment-page-1/#comment-21720</link>
		<dc:creator>Subbu</dc:creator>
		<pubDate>Tue, 10 Jul 2007 09:05:40 +0000</pubDate>
		<guid isPermaLink="false">http://particletree.com/notebook/adding-options-to-a-select-element/#comment-21720</guid>
		<description>&lt;p&gt;@Bramus!: Thanks a lot :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Bramus!: Thanks a lot :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Bramus!</title>
		<link>http://particletree.com/notebook/adding-options-to-a-select-element/comment-page-1/#comment-21713</link>
		<dc:creator>Bramus!</dc:creator>
		<pubDate>Tue, 10 Jul 2007 06:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://particletree.com/notebook/adding-options-to-a-select-element/#comment-21713</guid>
		<description>&lt;p&gt;Found this piece of code somewhere in the archive:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;try {
el.add(option, null); // doesn&#039;t work in IE
} catch(e) {
el.add(option); // works in IE
}
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Quite odd, but it works (looks like the null pos param is messing things up in IE) although it can&#039;t be used to insert elements anywhere but at the end. Maybe I should revise it and use your code ;-)&lt;/p&gt;

&lt;p&gt;@ Tobie: thanks for the info :-)&lt;/p&gt;

&lt;p&gt;@ Subbu: el is the element indeed retrieved by document.getElementById() (or the prototype $() shorthand). &quot;.options&quot; is a property of that element. 
(TIP: do a $(&#039;yourList&#039;); in the FireBug console and click on the result to browse its properties and methods ;-))&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Found this piece of code somewhere in the archive:</p>

<pre><code>try {
el.add(option, null); // doesn't work in IE
} catch(e) {
el.add(option); // works in IE
}
}</code></pre>

<p>Quite odd, but it works (looks like the null pos param is messing things up in IE) although it can&#8217;t be used to insert elements anywhere but at the end. Maybe I should revise it and use your code ;-)</p>

<p>@ Tobie: thanks for the info :-)</p>

<p>@ Subbu: el is the element indeed retrieved by document.getElementById() (or the prototype $() shorthand). &#8220;.options&#8221; is a property of that element. 
(TIP: do a $(&#8216;yourList&#8217;); in the FireBug console and click on the result to browse its properties and methods ;-))</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Subbu</title>
		<link>http://particletree.com/notebook/adding-options-to-a-select-element/comment-page-1/#comment-21703</link>
		<dc:creator>Subbu</dc:creator>
		<pubDate>Tue, 10 Jul 2007 05:16:05 +0000</pubDate>
		<guid isPermaLink="false">http://particletree.com/notebook/adding-options-to-a-select-element/#comment-21703</guid>
		<description>&lt;p&gt;Hi Ryan, I am a bit confused with the usage of &#039;el.options&#039;. Is &#039;el&#039; the resultant of something like $(&#039;someElement&#039;)? Then what is options method? Thanks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Ryan, I am a bit confused with the usage of &#8216;el.options&#8217;. Is &#8216;el&#8217; the resultant of something like $(&#8216;someElement&#8217;)? Then what is options method? Thanks.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Campbell</title>
		<link>http://particletree.com/notebook/adding-options-to-a-select-element/comment-page-1/#comment-21677</link>
		<dc:creator>Ryan Campbell</dc:creator>
		<pubDate>Mon, 09 Jul 2007 17:24:30 +0000</pubDate>
		<guid isPermaLink="false">http://particletree.com/notebook/adding-options-to-a-select-element/#comment-21677</guid>
		<description>&lt;p&gt;Thanks for the heads up, Tobie. I&#039;m with Morgan -- it&#039;s good to know there are people a lot smarter than I am staying on top of this stuff.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the heads up, Tobie. I&#8217;m with Morgan &#8212; it&#8217;s good to know there are people a lot smarter than I am staying on top of this stuff.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Morgan Roderick</title>
		<link>http://particletree.com/notebook/adding-options-to-a-select-element/comment-page-1/#comment-21676</link>
		<dc:creator>Morgan Roderick</dc:creator>
		<pubDate>Mon, 09 Jul 2007 16:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://particletree.com/notebook/adding-options-to-a-select-element/#comment-21676</guid>
		<description>&lt;p&gt;Yeah, I&#039;ve run into this one on more than one occasion. After a period of time, I tend to forget, and run into it again.&lt;/p&gt;

&lt;p&gt;Good to see that the fantastic libraries out there are handling more and more of this bllx for us.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yeah, I&#8217;ve run into this one on more than one occasion. After a period of time, I tend to forget, and run into it again.</p>

<p>Good to see that the fantastic libraries out there are handling more and more of this bllx for us.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tobie Langel</title>
		<link>http://particletree.com/notebook/adding-options-to-a-select-element/comment-page-1/#comment-21674</link>
		<dc:creator>Tobie Langel</dc:creator>
		<pubDate>Mon, 09 Jul 2007 16:17:51 +0000</pubDate>
		<guid isPermaLink="false">http://particletree.com/notebook/adding-options-to-a-select-element/#comment-21674</guid>
		<description>&lt;p&gt;Hi Ryan,&lt;/p&gt;

&lt;p&gt;That&#039;s been fixed in SVN trunk. If you&#039;re running edge you can now write:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$(element).insert({bottom: &#039;foo&#039;});&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$(element).insert(&#039;foo&#039;);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(&lt;code&gt;Element#insert&lt;/code&gt; defaults to bottom if no option is specified.)&lt;/p&gt;

&lt;p&gt;This syntax will replace &lt;code&gt;new Insertion...&lt;/code&gt; in the next Prototype release (which will be kept for backwards compatibility).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Ryan,</p>

<p>That&#8217;s been fixed in SVN trunk. If you&#8217;re running edge you can now write:</p>

<pre><code>$(element).insert({bottom: 'foo'});</code></pre>

<p>or:</p>

<pre><code>$(element).insert('foo');</code></pre>

<p>(<code>Element#insert</code> defaults to bottom if no option is specified.)</p>

<p>This syntax will replace <code>new Insertion...</code> in the next Prototype release (which will be kept for backwards compatibility).</p>]]></content:encoded>
	</item>
</channel>
</rss>
