Hi,
actually you just need to find out which is the default value of your
select box and then select this via script.
I use the following code for it:
<--snip-->
for (var i=0;i<sel.options.length;i++) {
sel.options[i].selected = sel.options[i].defaultSelected;
}
<--snip-->
Add this to you "resetMySelectBox(sel)"- function and you'll be happy ;o)
hf
Bastian
On Nov 16, 2007 7:16 PM, <[EMAIL PROTECTED]> wrote:
> Hello,
>
> is there a way to reset a select box to it's default value?
>
> Or do I habe to use update() on the select box to empty it and then add all
> the options again?
>
> TIA,
> Alex
>
> >
>
--
--
spread the word ... see www.browsehappy.com ;o)
Calvin: Weekends don't count unless you spend them doing something
completely pointless.
Join the Greater IBM Connection (http://www.xing.com/premiumgroup-6291.d26b7d)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---