Hi have a newbie question and i have used the search box but couldnt find the answer basically i have a form and within this form is a div that i want to be visible or hidden depending on a user selection of a radio button however i cant seem to get it to work this is what i have coded begining with the div the full script in order can be found at the bottom of the page:
<div id=”NoOfPrivRM” align=”right” style=”visibility:hidden”>
Some other stuff here
</div>
before this div i have two check boxes when one is selected it calls a javascript function as so::
<input type=”radio” name=”privDin” value=”yes” onclick=”privDinY()”>
<input type=”radio” name=”privDin” value=”No” onClick=”privDinN()” >
and the two functions are:::
function privDinY(){
NoOfPrivRM.style.visibility=’visible’;
register2.privDinRm.focus();
}
function privDinN(){
NoOfPrivRm.style.visibility=’hidden’;
}
===========================Full script==============
<script type=”text/javascript”>
function privDinY(){
NoOfPrivRM.style.visibility=’visible’;
register2.privDinRm.focus();
}
function privDinN(){
NoOfPrivRm.style.visibility=’hidden’;
}
</script>
Yes
<input type=”radio” name=”privDin” value=”yes” onclick=”privDinY()”>
No
<input type=”radio” name=”privDin” value=”No” onClick=”privDinN()” checked=”checked”>
</span> </div></td>
<td> </td>
<td> </td>
<td align=”right”> </td>
<td width=”116″> </td>
</tr>
<tr>
<td><span class=”style1″>No Of Private Rooms:</span></td>
<td colspan=”2″>
<div id=”NoOfPrivRM” align=”right” style=”visibility:visible”>
Some stuff here
</div>