Line | |
---|
1 | |
---|
2 | function select_checkboxes(curFormId, link, new_string) |
---|
3 | { |
---|
4 | var curForm = document.getElementById(curFormId); |
---|
5 | var inputlist = curForm.getElementsByTagName("input"); |
---|
6 | for (i = 0; i < inputlist.length; i++) |
---|
7 | { |
---|
8 | if (inputlist[i].getAttribute("type") == 'checkbox' && inputlist[i].disabled == false) |
---|
9 | inputlist[i].checked = true; |
---|
10 | } |
---|
11 | |
---|
12 | link.setAttribute('onclick', 'return unselect_checkboxes(\'' + curFormId + '\', this, \'' + link.innerHTML + '\')'); |
---|
13 | link.innerHTML = new_string; |
---|
14 | |
---|
15 | return false; |
---|
16 | } |
---|
17 | |
---|
18 | function unselect_checkboxes(curFormId, link, new_string) |
---|
19 | { |
---|
20 | var curForm = document.getElementById(curFormId); |
---|
21 | var inputlist = curForm.getElementsByTagName("input"); |
---|
22 | for (i = 0; i < inputlist.length; i++) |
---|
23 | { |
---|
24 | if (inputlist[i].getAttribute("type") == 'checkbox' && inputlist[i].disabled == false) |
---|
25 | inputlist[i].checked = false; |
---|
26 | } |
---|
27 | |
---|
28 | link.setAttribute('onclick', 'return select_checkboxes(\'' + curFormId + '\', this, \'' + link.innerHTML + '\')'); |
---|
29 | link.innerHTML = new_string; |
---|
30 | |
---|
31 | return false; |
---|
32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.