Forum Moderators: open
If any other radio buttons are selected it displays another div with two radio buttons, correctly.
Problem is when the first radio button is selected again the div needs to disappear.
The only way I can get this to work is if I have an onload function which hides the div. But I have tried calling this function onclick="()". The first radio button already has three onclick functions associated with it.
This is the function
<script>
/* Hide Div */
function hidediv(){
document.getElementById("hideme").style.display="none";
} </script>
The solutions would be something like hiding the div (id=hideme) when radio button is selected.
I am not looking for the usual show/hide divs code. This is part of a huge JS file and I dont really want to make it much more complicated. Hope this makes sense. Thanks in advance
<script type="text/JavaScript">
function show(id)
{
if (document.getElementById(id).style.display == 'none')
{
document.getElementById(id).style.display = '';
}
}
function hide(id)
{
document.getElementById(id).style.display = 'none';
}
</script>
Set div to display:none