Reputation: 29
I am newbie in javascript. i have one textBox and radioButton. if i click on the textBox the radioButton should be clicked. Any example for this?
Upvotes: 0
Views: 91
Reputation: 329
This should do the work :
<html>
<head>
<script type="text/javascript">
function boo()
{
document.all.myRadioButton1.checked = true;
}
</script>
</head>
<body>
<input type="text" value="some text" onclick="boo()">
<input type="radio" id="myRadioButton1">
</body>
</html>
Upvotes: 2