KilLrBuNieZ wrote:
> ...
>
> My problem is when the user selects the "no selection" first option in
> the #1 select box. I need to "reset" the other three select boxes.
> However, the following throws no errors but does not work:
>
> $("selectTwo","selectThree","selectFour").selectedIndex = 0;
>
> The following does work, but come on!
>
> $("selectTwo").selectedIndex = 0;
> $("selectThree").selectedIndex = 0;
> $("selectFour").selectedIndex = 0;
>
> ...
try this:

$("selectTwo","selectThree","selectFour").each(function(element) {
    element.selectedIndex = 0;
});
// or
$("selectTwo","selectThree","selectFour").invoke('writeAttribute', 
'selectedIndex', 0);

- Ken Snyder

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