B
Ben
Here's what I have se far:
<script type="text/javascript">
other_text.disabled = true;
function other_text() {
other_text.disabled = (other_check.checked == false)? false :
true;
}
</script>
<input type="checkbox" id="other_check" name="other_check"
onchange="other_text()" /><label for="other_check">Other</label><br />
<input type="text" id="other_text" />
But it doesn't work.
I did have it working using a onchange on the checkbox and having the
"other_text" text box disabled by default, but this ment that if the
browser didn't support or have JS enabled then the text box would stay
disabled. So I need to disable it using javascript, and re-enable it
when the checkbox is checked.
Any suggestions?
<script type="text/javascript">
other_text.disabled = true;
function other_text() {
other_text.disabled = (other_check.checked == false)? false :
true;
}
</script>
<input type="checkbox" id="other_check" name="other_check"
onchange="other_text()" /><label for="other_check">Other</label><br />
<input type="text" id="other_text" />
But it doesn't work.
I did have it working using a onchange on the checkbox and having the
"other_text" text box disabled by default, but this ment that if the
browser didn't support or have JS enabled then the text box would stay
disabled. So I need to disable it using javascript, and re-enable it
when the checkbox is checked.
Any suggestions?