Jump to content

regd chek box in the jsp's


padmapraveen_vasili

Recommended Posts

hi all,i have two check boxes A and B, they both result to a dropdown list for countries.if i check, box A it shows the dropdown for A and the dropdown for for B must be disabled. and viceversa. they are mutually exclusive.and the country selected in dropdown for A should not appear in dropdown for B.i think i have explained to my level best.can any one please give the script for this issue.thanks in advance to every one..

Link to comment
Share on other sites

i was expecting fast reply from you ASPNET guy..yes they are radio buttons, we can not select both at time, we can select only one at a time.the other gets into disable mode. they have seperate drop downs.

Link to comment
Share on other sites

try this

<html><head>		<title>How to opaque</title>	<script type="text/javascript">    function ddlViewState(letter)  { 	 //disable both 	 var ddlA = document.getElementById('ddlA'); 	 var ddlB = document.getElementById('ddlB'); 	 ddlA.disabled = true; 	 ddlB.disabled = true; 	 //enable selected ddl 	 var selectedDdl = document.getElementById('ddl' + letter); 	 selectedDdl.disabled = false;  }	</script></head><body><table>  <tr>    <td>	<select id="ddlA">  <option value="1">One A</option>  <option value="2">Two A</option>  <option value="3">Three A</option>  <option value="4">Four A</option>	</select>    </td>    <td>	<select id="ddlB">  <option value="1">One B</option>  <option value="2">Two B</option>  <option value="3">Three B</option>  <option value="4">Four B</option>	</select>    </td>  </tr></table><div>	<input type="radio" name="radioGroup" value="A" onclick="ddlViewState(this.value)"/> A 	<br/>		<input type="radio" name="radioGroup" value="B" onclick="ddlViewState(this.value)"/> B </div></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...