S
Stijn Goris
hi all,
I try to enable some form elements (positie and fotoToevoegen) when a user
clicks a checkbox. Sadly enough it doesn't work I use the
'onSelect="EnableInput();'. The function is defined inside the form. Maybee
someone knows the problem?
kind regards
Stijn
<form name="nieuws" method="post"
action="nieuwsVoegToe.php?actie=nieuw&IDN=">
Titel <input class="grijs" name="titel" type="text" size="40">
<select class="grijs" name="type" >
</select>
<textarea class="grijs1" name="inhoud" cols="80"
rows="8"></textarea><br><br>
<script LANGUAGE="JavaScript">
function EnableInput()
{
document.nieuws.positie.Disabled = "False";
document.nieuws.fotoToevoegen.Disabled = "False";
}
</script>
foto toevoegen? <input name="fotoToevoegen" type="checkbox" value="1"
onSelect="EnableInput();"><br>
<table class="grijs" bgcolor="#EEEEEE" >
<tr><td>
selecteer je foto:
<input type="hidden" name="MAX_FILE_SIZE" value="20000">
<input type="file" name="foto">
</td></tr>
<tr>
<td>
<table>
<tr>
<td><img src="images/imageBoven.jpg"></td>
<td><img src="images/imageRechts.jpg"></td>
<td><img src="images/imageOnder.jpg"></td>
<td><img src="images/imageLinks.jpg"></td>
</tr>
<tr align="center">
<td><input type="radio" name="positie" value="boven"></td>
<td><input type="radio" name="positie" value="rechts"></td>
<td><input type="radio" name="positie" value="onder"></td>
<td><input type="radio" name="positie" value="links"></td>
</tr>
</table>
</td>
</tr>
</table><br>
<input class="grijs" type="submit" value="nieuws toevoegen >>">
</form>
I try to enable some form elements (positie and fotoToevoegen) when a user
clicks a checkbox. Sadly enough it doesn't work I use the
'onSelect="EnableInput();'. The function is defined inside the form. Maybee
someone knows the problem?
kind regards
Stijn
<form name="nieuws" method="post"
action="nieuwsVoegToe.php?actie=nieuw&IDN=">
Titel <input class="grijs" name="titel" type="text" size="40">
<select class="grijs" name="type" >
</select>
<textarea class="grijs1" name="inhoud" cols="80"
rows="8"></textarea><br><br>
<script LANGUAGE="JavaScript">
function EnableInput()
{
document.nieuws.positie.Disabled = "False";
document.nieuws.fotoToevoegen.Disabled = "False";
}
</script>
foto toevoegen? <input name="fotoToevoegen" type="checkbox" value="1"
onSelect="EnableInput();"><br>
<table class="grijs" bgcolor="#EEEEEE" >
<tr><td>
selecteer je foto:
<input type="hidden" name="MAX_FILE_SIZE" value="20000">
<input type="file" name="foto">
</td></tr>
<tr>
<td>
<table>
<tr>
<td><img src="images/imageBoven.jpg"></td>
<td><img src="images/imageRechts.jpg"></td>
<td><img src="images/imageOnder.jpg"></td>
<td><img src="images/imageLinks.jpg"></td>
</tr>
<tr align="center">
<td><input type="radio" name="positie" value="boven"></td>
<td><input type="radio" name="positie" value="rechts"></td>
<td><input type="radio" name="positie" value="onder"></td>
<td><input type="radio" name="positie" value="links"></td>
</tr>
</table>
</td>
</tr>
</table><br>
<input class="grijs" type="submit" value="nieuws toevoegen >>">
</form>