MMsabry
asked on
Who to unselect all checkboxes
Hi, I would like to have button on a page (contains a table with each row has a checkbox) that deselect all checked boxes
thanks
thanks
ASKER
thank, but what do you mean by : <!--- place above checkbox--->, you meant place in the head of the page, right?
yes that's whta i meant....
ASKER
Nope did not work!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, second code works fine, and nope I did not install SP2 yet, I'm in the middle of a project, not taking any risks.
now, this works fine to select all but to if i select a few and want to deselect them, i have to click your check box twice!
is there a way around this?
thanks
now, this works fine to select all but to if i select a few and want to deselect them, i have to click your check box twice!
is there a way around this?
thanks
Try kkhipple code. And assign your points to him. That works.
ASKER
hiranmaya, "YES, Sir"!!!!
<!--- place above checkbox--->
<SCRIPT>
function checkBoxes (form, check) {
var flagThis = false;
for (var c = 0; c < form.elements.length; c++)
flagThis = false;
if (form.elements[c].type == 'checkbox')
form.elements[c].checked = check;
flagThis = true;
if (flagThis)
form.elements[c].checked = enabled;
}
</SCRIPT>
<!--- to check all checkboxes --->
<INPUT TYPe="CHECKBOX" NAME="applyToAll" ONCLICK="checkBoxes(this.f