source: branches/rsr.v5.1.1/web/punbb/common.js @ 4

Last change on this file since 4 was 4, checked in by dj3c1t, 12 years ago

passage en v5.1.1

File size: 1002 bytes
Line 
1
2function 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
18function 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.