> <select name="select1" id="select1"
> > >   blah blah
> </select>
>
> <select name="select2" id="select2"
> > >   blah blah
> </select>
>
> Hope I am making sense.
>
> Here is my code.
> function setDept1()
> {
>   if (document.frm.select1.selectedIndex != 0) {
>      myindex=document.frm.select1.selectedIndex;
>      var document.frm.hidselect.value =
> document.frm.select1.options[myindex].value;
>      return true;
>     }
> }
>
> How do I pass the name of the drop-down box to the function
> and then assign the selected option value to a hidden
> variable. Can anybody please help me get round this problem.
> Best regards,
> cfcoder

>
Or you can pass the name explicitly.

>
Then in your function use "this" as the reference.

Mike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to