"Anthony" <an*****@notspecified.nl> wrote in message
news:41***********************@news.xs4all.nl...
Hi,
Is there a way to put focus on a form element of type radio or checkbox.
It only seems to work on input of type text...
Thanks in advance,
Anthony
A Google search on "JavaScript checkbox methods focus" would have given you
your answer:
http://www.devguru.com/Technologies/...ef/chkbox.html http://www.devguru.com/Technologies/...ref/radio.html
<html>
<head>
<title>focus.htm</title>
</head>
<body>
<form name="form1">
<input type="radio" name="radio1" value="1">One
<input type="radio" name="radio1" value="2">Two
<br>
<input type="checkbox" name="check1" value="1">One
<input type="checkbox" name="check2" value="2">Two
<br>
<input type="button" value="radio"
onclick="document.form1.radio1[0].focus()">
<input type="button" value="checkbox"
onclick="document.form1.check1.focus()">
</form>
</body>
</html>