K
killermookie
I'm not a javascripter so this is slightly unfamiliar to me. What I'm
trying to do is that if someone clicks the radio button for Other, then
the text input for other will become enabled.
What is wrong with this? Thank you!
<html>
<head>
<script language="JavaScript">
<!--
function Package(thisform) {
if (thisform.package[3].checked) {
thisform.otherPackage.disabled = false
} else {
thisform.otherPackage.disabled = true
}
}
-->
</script>
</head>
<body>
<form name="shipForm">
<input type="text" name="number" size="5">
<input type="radio" name="package"
onClick=Package(shipForm)>Pallet</span>
<input type="radio" name="package" onClick=Package(shipForm)>Box</span>
<input type="radio" name="package"
onClick=Package(shipForm)>Envelope</span>
<input type="radio" name="package"
onClick=Package(shipForm)>Other</span>
<input type="text" name="otherPackage" disabled>
</form>
</body>
</html>
trying to do is that if someone clicks the radio button for Other, then
the text input for other will become enabled.
What is wrong with this? Thank you!
<html>
<head>
<script language="JavaScript">
<!--
function Package(thisform) {
if (thisform.package[3].checked) {
thisform.otherPackage.disabled = false
} else {
thisform.otherPackage.disabled = true
}
}
-->
</script>
</head>
<body>
<form name="shipForm">
<input type="text" name="number" size="5">
<input type="radio" name="package"
onClick=Package(shipForm)>Pallet</span>
<input type="radio" name="package" onClick=Package(shipForm)>Box</span>
<input type="radio" name="package"
onClick=Package(shipForm)>Envelope</span>
<input type="radio" name="package"
onClick=Package(shipForm)>Other</span>
<input type="text" name="otherPackage" disabled>
</form>
</body>
</html>