Beauty!  Thanks man!

On May 29, 2:52 am, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi,
>
> The `Option` constructor is provided by the browser and returns an
> HTMLOptionElement instance; since IE6 and IE7 don't allow prototypical
> extensions to these things[1], you have to run it through `$` (or
> `Element.extend`) to extend the element:
>
> function optionAdder(s) {
>   var optIdx = $('mySelect').options.length;
>   $('mySelect').options[optIdx] = $(new Option(s.text, s.val)); // <==
> Change is here
>   $('mySelect').options[optIdx].store("meta", s.meta);
>
> }
>
> In contrast to `Option`, the `Element` constructor is provided by
> Prototype and does this for you automatically.
>
> [1]http://prototypejs.org/learn/extensions
>
> HTH,
> --
> T.J. Crowder
> Independent Software Consultant
> tj / crowder software / comwww.crowdersoftware.com
>
> On May 28, 4:30 pm, blechler <lech...@gmail.com> wrote:
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to