summaryrefslogtreecommitdiff
path: root/static/details.js
blob: bd42bb4cb03f63075b9c47b1e84a6680c51e4639 (plain)
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

function add(type) {
	var node = document.getElementById("hperson");

	ntr = document.createElement("tr");
	ntd = document.createElement("td");
	ntxt = document.createTextNode("x");
	ntd.appendChild(ntxt);
	ntr.appendChild(ntd);

	node.parentNode.insertBefore(ntr, node);

	window.alert('tag' + node.nodeName);
	for (node = node.nextSibling; node != null; node = node.nextSibling) {
		window.alert('tag' + node.nodeName);
		if (node.nodeName != 'TR')
			continue;
		var td = node.getElementsByTagName("TD");
		if (td == null)
			continue;
		var input = td[1].getElementsByTagName("INPUT");
		if (input == null)
			continue;
		for (var k = 0; k < input.length; k++)
			input[k].style.display = 'none';
	}
}