Script Categories













Forms >>> Checkbox Changer.

Takes a series of known named checkboxes and checks or uncheck them all at once. It can even change each checkbox to the opposite checked or not checked value.

C1 C2 C3 C4 C5 C6 C7
C8 C9 C10 C11 C12 C13 C14




Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function checkAll() {
for (var j = 1; j <= 14; j++) {
box = eval("document.checkboxform.C" + j);
if (box.checked == false) box.checked = true;
   }
}

function uncheckAll() {
for (var j = 1; j <= 14; j++) {
box = eval("document.checkboxform.C" + j);
if (box.checked == true) box.checked = false;
   }
}

function switchAll() {
for (var j = 1; j <= 14; j++) {
box = eval("document.checkboxform.C" + j);
box.checked = !box.checked;
   }
}
//  End -->
</script>
<form name=checkboxform>
<input
type=checkbox name=C1 checked>C1
<input type=checkbox name=C2 checked>C2
<input type=checkbox name=C3 checked>C3
<input type=checkbox name=C4 checked>C4
<input type=checkbox name=C5 checked>C5
<input type=checkbox name=C6 checked>C6
<input type=checkbox name=C7 checked>C7<br>
<input type=checkbox name=C8 checked>C8
<input type=checkbox name=C9 checked>C9
<input type=checkbox name=C10 checked>C10
<input type=checkbox name=C11 checked>C11
<input type=checkbox name=C12 checked>C12
<input type=checkbox name=C13 checked>C13
<input type=checkbox name=C14 checked>C14<br>
<
br>
<input type=button value="Check All" onClick="checkAll()"><br>
<input type=button value="Uncheck All" onClick="uncheckAll()"><br>
<input type=button value="Switch All" onClick="switchAll()"><br>
</form>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).

Bitcoin Gambling Site . website


©