Link to home
Start Free TrialLog in
Avatar of tsmithinnc
tsmithinncFlag for United States of America

asked on

Javascript onselect from drop down box

I have a drop down box ...
When the enduser selects something from this box, I need the focus to go to two radio buttons and require them to choose one of them...

and I need the radio buttons inactive UNTIL someone is selected from drop down...

Possible?
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Show your html that you have so far.

something like this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
      <title>Untitled</title>
</head>

<body>
<select name="mySelect" id="mySelect" onChange="if(this.options[this.selectedIndex].value=='show'){document.getElementById('myFieldSet').style.visibility='visible'}else{document.getElementById('myFieldSet').style.visibility='hidden'}">
<option value="">Select</option>
<option value="show">Show</option>
<option value="hide">Hide</option>

</select><br>


<fieldset id="myFieldSet" style="border:1px solid grey; width:50%; visibility:hidden">
<legend>Select Option</legend>
<input type="radio" name="myRadio" value="0">Option 1<br>
<input type="radio" name="myRadio" value="1">Option 2<br>
<input type="radio" name="myRadio" value="2">Option 3<br>
<input type="radio" name="myRadio" value="3">Option 4<br>
</fieldset>


</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of netsmithcentral
netsmithcentral
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial