need to fix this
Hi Below is the code in which we have two div tags and when i select one option fron radio button i need to show one block and when i select other option i need to show other block of code and hide the other , but i amnot able to do that , will any one help me in this
thanks
<script language="JavaScript" type="text/javascript">
function showHide(el_id) {
if (document.getElementById(el_id).style.display == "none"){
document.getElementById(el_id).style.display = "block";
}
else if(document.getElementById(el_id).style.display == "block"){
document.getElementById(el_id).style.display = "none";
}
}
</script>
<input type="radio" name="myName" value="0" onClick="showHide('showHideDiv');">select multiple divisions
<input type="radio" name="myName" value="1" onClick="showHide('showHideDiv');" checked="true">No Multiple Selections
<div id="showHideDiv" style="display:none;">
<table>
<tr>
<td><strong>Division:</strong></td>
<td>
<select name="div_no" multiple="true" size="5" >
<cfoutput query="qryDivisions">
<option value="div_no">#div_no# - #div_desc#</option>
</cfoutput>
</select></td></tr>
</table>
</div>
<div id="showHideDiv" style="display:none;">
<table>
<tr>
<td><strong>Division:</strong></td>
<td>
<select name="div_no" multiple="true" size="5" >
<cfoutput query="qryDivisions">
<option value="div_no">#div_no# - #div_desc#</option>
</cfoutput>
</select></td></tr>
</table>
</div>
