How can I reset all the checks in the script below (was originally submitted to a previous thread by Dookie2k2), since If I press some buttons and the click Check All it will check all the others buttons and will remove the selection from the others (mirror response)
<html>
<head>
<script language='javascript'><!--
function checkAll()
{
fLength = document.f1.length;
for (x=0;x<fLength;x++)
{
e = document.f1.elements[x];
if (e.type == 'checkbox')
{
if (e.checked)
{
e.checked = false;
}
else
{
e.checked = true;
}
}
}
}
//--></script>
</head>
<BODY>
<form name='f1'>
Check All<input type='checkbox' onClick='checkAll()'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
</form>
</body>
</html>
<html>
<head>
<script language='javascript'><!--
function checkAll()
{
fLength = document.f1.length;
for (x=0;x<fLength;x++)
{
e = document.f1.elements[x];
if (e.type == 'checkbox')
{
if (e.checked)
{
e.checked = false;
}
else
{
e.checked = true;
}
}
}
}
//--></script>
</head>
<BODY>
<form name='f1'>
Check All<input type='checkbox' onClick='checkAll()'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
<input type='checkbox'><Br>
</form>
</body>
</html>