-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions_js_checkbox.inc.php
More file actions
29 lines (28 loc) · 1.04 KB
/
functions_js_checkbox.inc.php
File metadata and controls
29 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<script language="JavaScript" type="text/javascript">
<!-- // selcbox by Elf Qrin r20sep2016 fr24nov2002
function selItm(t) {
var eb=1; var tw=document.console.length-1;
var itmn="document.console.elements";
switch (t) {
case 1:
for (var i=eb;i<=tw;i++) {var ir=eval(itmn+"["+i+"]"); if (ir.type=="checkbox") {ir.checked=true;}}
break;
case 2:
for (var i=eb;i<=tw;i++) {var ir=eval(itmn+"["+i+"]"); if (ir.type=="checkbox") {ir.checked=false;}}
break;
case 3:
for (var i=eb;i<=tw;i++) {
var ir=eval(itmn+"["+i+"]");
if (ir.type=="checkbox" && ir.checked) {ir.checked=false;} else {ir.checked=true;}
}
break;
}
}
function drawSelItmButtons() {
document.writeln('<? echo "Select"; ?>:');
document.writeln('<input type="button" class="submitinput" value="<? echo "All"; ?>" onClick="selItm(1);">');
document.writeln('<input type="button" class="submitinput" value="<? echo "None"; ?>" onClick="selItm(2);">');
document.writeln('<input type="button" class="submitinput" value="<? echo "Toggle"; ?>" onClick="selItm(3);">');
}
// -->
</script>