View Full Version : Addressing checkbox in order to uncheck it
10-17-2005, 10:29 PM
I am creating a script called by an onClick event for a checkbox. Under certain conditions, I want to reset the checkbox to unchecked in the function. The checkbox that has been checked is one of many checkboxes all with the same name (each has a unique id). To set the value of the check box back to unchecked, how can I address the checkbox? I have tried, for instance, this.checked=false, but this does not work.
10-17-2005, 10:53 PM
will do it.
if you have stored the checkboxname in variable i.e. function Uncheck(box) it should be:
in the last example the checkbox's ID is called within the function onClick="Uncheck('checkboxID')"
10-17-2005, 11:53 PM
Awesome, thanks... I also got the following to work:
and in the script
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.