R
R.G. Vervoort
I would like to make a script wich makes a select visible or not visible
depending on what radio button is selected.
If the radiobutton with the value "nieuw" is selected the pulldown is not
visible and when i select the radiobutton with the value "verwijderen" the
pulldown should become visible.
The code i have makes the pull down visible but does not make it invisible
after i select another radiobutton.
This what i have so far:
<script language="JavaScript">
<!--
function Menue()
{
if (document.all.keuze.value == "nieuw")
{
document.all.naam_keuze.style.visibility="hidden"
}
else
{
document.all.naam_keuze.style.visibility="visible"
}
};
//-->
</script>
</head>
<body>
<h1>Specialisten / zorgverleners</h1>
<p align="left">
<input id="keuze" type="radio" name="keuze" value="nieuw"
onClick="Menue()">
Nieuw
<input id="keuze" type="radio" name="keuze" value="bewerken"
onClick="Menue()">
Bewerken
<input id="keuze" type="radio" name="keuze" value="verwijderen"
onClick="Menue()">
Verwijderen<img src="images/spacer.gif" width="100" height="5">
<select id="naam_keuze" size="1" name="keuze" style="visibility:visible">
<option>roy</option>
<option>jan</option>
<option>hans</option>
<option>piet</option>
</select>
</p>
thanks
roy
depending on what radio button is selected.
If the radiobutton with the value "nieuw" is selected the pulldown is not
visible and when i select the radiobutton with the value "verwijderen" the
pulldown should become visible.
The code i have makes the pull down visible but does not make it invisible
after i select another radiobutton.
This what i have so far:
<script language="JavaScript">
<!--
function Menue()
{
if (document.all.keuze.value == "nieuw")
{
document.all.naam_keuze.style.visibility="hidden"
}
else
{
document.all.naam_keuze.style.visibility="visible"
}
};
//-->
</script>
</head>
<body>
<h1>Specialisten / zorgverleners</h1>
<p align="left">
<input id="keuze" type="radio" name="keuze" value="nieuw"
onClick="Menue()">
Nieuw
<input id="keuze" type="radio" name="keuze" value="bewerken"
onClick="Menue()">
Bewerken
<input id="keuze" type="radio" name="keuze" value="verwijderen"
onClick="Menue()">
Verwijderen<img src="images/spacer.gif" width="100" height="5">
<select id="naam_keuze" size="1" name="keuze" style="visibility:visible">
<option>roy</option>
<option>jan</option>
<option>hans</option>
<option>piet</option>
</select>
</p>
thanks
roy