<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title>StanDarsh’s Checkbox Script</title>
<meta http-equiv=”Content-type” content=”text/html; charset=iso-8859-1″ />
<script type=”text/javascript”><!–
function checkAll (obj) {
var arrInput = document.getElementsByTagName(“input”);
for (i=0; i<arrInput.length; i++) {
if (arrInput[i].type == ‘checkbox’) {
arrInput[i].checked = obj.checked;
} else {
arrInput[i].value = “not a checkbox”;
}
}
}
–></script>
</head>

<body>
<form id=”chktest” method=”get” action=”">
<div>
<input type=”checkbox” name=”chk_all” id=”chk_all” value=”" onchange=”checkAll(this);” />
<label for=”chk_all”>Check All</label>
</div>
<div><input type=”checkbox” name=”chk_1″ id=”chk_1″ value=”" /></div>
<div><input type=”checkbox” name=”chk_2″ id=”chk_2″ value=”" /></div>
<div><input type=”checkbox” name=”chk_3″ id=”chk_3″ value=”" /></div>
<div><input type=”checkbox” name=”chk_4″ id=”chk_4″ value=”" /></div>
<div><input type=”checkbox” name=”chk_5″ id=”chk_5″ value=”" /></div>
<div><input type=”text” name=”text_1″ id=”text_1″ value=”" /></div>
</form>
</body>
</html>