On Jan 26, 12:03 pm, "Justin Perkins" <[EMAIL PROTECTED]> wrote:
> On Jan 25, 2008 5:57 PM, RobG <[EMAIL PROTECTED]> wrote:
>
> > Depends on your criteria for "better".
> > No, it doesn't.
>
> I guess I should have clarified that I'm referring to a means to
> reliably set the selected state for a select box, across all browsers,
> without branching.

I expect that both methods are equally reliable across all browsers,
there is no need to use one or the other based on the browser.  Which
one is "best" depends on the circumstance.

If the intention is to set say the third option to selected, I'd
likely use selectedIndex.  If the intention was to set the option with
a particular value to selected, I'd iterate over the options
collection until I found the option, then set its selected property.

--
Rob

--~--~---------~--~----~------------~-------~--~----~
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