File: CheckAll.js

package info (click to toggle)
phpldapadmin 1.2.6.7-3~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 5,432 kB
  • sloc: php: 17,675; javascript: 5,299; xml: 1,498; sh: 379; python: 148; makefile: 23
file content (22 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function CheckAll(setbgcolor,form,index) {
	htmlform = document.getElementById(form+index);

	for (var i=0;i<htmlform.elements.length;i++) {
		var e = htmlform.elements[i];

		if (e.type == 'checkbox' && e.name != 'allbox') {
			e.checked = htmlform.allbox.checked;

			if (!document.layers && setbgcolor) {
				var tr = document.getElementById('tr_'+e.id);

				if (e.checked) {
					tr.style.backgroundColor='#DDDDFF';
				} else {
					var id = e.id.substr(3);
					tr.style.backgroundColor= id%2 ? '#E0E0E0' : '#F0F0F0';
				}
			}
		}
	}
}