I see that a prototype method to deal with this would be useful. Or
maybe a WIKI to have this sort of thing all in one place.

In the end I'm returning a JSON array from the server and then using

$('SelectContract').options[i] = new Option(....);

This is working for me in IE7 and FF.

Thank you for your support and replies.

Regards,

Richard Quadling.

On 20/03/07, RobG <[EMAIL PROTECTED]> wrote:
>
>
>
> On Mar 20, 10:00 pm, Colin Mollenhour <[EMAIL PROTECTED]>
> wrote:
> > This has been brought up quite a few times here in this group actually..
> > IE doesn't like updating "select" elements with innerHTML. You need to
> > use this method
> >
> > $('myselect').options[i] = new Option(...);
>
> You can also use createElement, however since IE will not set the text
> property properly, append a text node:
>
>   var opt = document.createElement('option');
>   opt.value = 'foo';
>   opt.appendChild(document.createTextNode('foobar'));
>
>
> --
> Rob
>
>
> >
>


-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to