Jump to content

regarding radio buttons


nikhar021

Recommended Posts

You can't. This type of thing is what Javascript is for.

 

I suppose you would give your dropdown box an id and then use onclick on the radio buttons enable/disable the dropdown list.

 

Something like:

 

<form action="formprocessor" method="post">
<input type="radio" name="testelement" value="abc" onclick="document.getElementById("mydropdownbox").disabled='true';">i disable<br>
<input type="radio" name="testelement" value="123" onclick="document.getElementById("mydropdownbox").disabled='true';">i disable too<br>
<input type="radio" name="testelement" value="def" onclick="document.getElementById("mydropdownbox").disabled='false';">select me to enable the box<br>
<select name="dropbox" id="mydropdownbox" disabled="disabled">
<option>Option 1</option>
<option>Option 2</option>
</select>
</form>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.