[thelist] Toggle disable/enable of text box

Miller, Bart MillerB at bek.com
Thu Jan 18 09:29:31 CST 2001


I have a form where I want to disable an input box if a checkbox is checked
(see code below).  Now, it works fine when I check the box.  But when I
uncheck the box it does not become enabled again.  I only need this to work
in IE5+ browsers.  Is this a bug?

<form>
<input type=checkbox onclick="if (this.checked) {test.disabled = 'true'}
else {test.disabled='false'}">
<input name="test" value="Enter text here">
</form>




More information about the thelist mailing list