summaryrefslogtreecommitdiff
path: root/public/css/forms.js
blob: 630d8c2571f381380cb7bb5307276fa504b96151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function check_all(id) {
	var obj = document.getElementById(id);
	var boxes = obj.getElementsByTagName("input");
	for(var i = 0; i < boxes.length; i++) {
		if(boxes[i].type == "checkbox" && !boxes[i].disabled)
			boxes[i].checked = true;
	}
}

function uncheck_all(id) {
	var obj = document.getElementById(id);
	var boxes = obj.getElementsByTagName("input");
	for(var i = 0; i < boxes.length; i++) {
		if(boxes[i].type == "checkbox")
			boxes[i].checked = false;
	}
}