[thelist] Javascript Setting focus to Radio Button

Syed Zeeshan Haider szh at softhome.net
Fri Aug 16 12:32:01 CDT 2002


Hi,
Let's say, you have two sets of radio buttons in a form named "form1".
One is "r" and other is "s". Each of them contains three buttons. If you
change the tag of any button in "r" group to following:

<input type="radio" name="r" value="radiobutton"
onclick="form1.s[1].focus()">

Then, on clicking, it will take the focus to the second button in the
"s" group of radio buttons.
Note:
s[0] = for first button in "s" group
s[1] = for 2nd button in "s" group
s[2] = for 3rd button in "s" group
and so on...

Hope this helps!

Syed Zeeshan Haider.
http://syedzeeshanhaider.faithweb.com/




More information about the thelist mailing list