zw1971
09-20-2003, 05:58 PM
what i want is when people check the checkbox, it disable a text field?
but it seems the onChange() function doesn't work for checkbox.
Thanks
but it seems the onChange() function doesn't work for checkbox.
Thanks
|
Click to See Complete Forum and Search --> : Will this work for checkbox onChange()? zw1971 09-20-2003, 05:58 PM what i want is when people check the checkbox, it disable a text field? but it seems the onChange() function doesn't work for checkbox. Thanks Khalid Ali 09-20-2003, 06:12 PM use onclick event AdamBrill 09-20-2003, 06:15 PM Try this:<form name="form1"> <input type="text" name="textfield1">Enabled?<input type="checkbox" checked="checked" onclick="document.form1.textfield1.disabled=(this.checked)?false:true"> </form> zw1971 09-20-2003, 07:11 PM thanks, guys, it works. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |