Advertisement
Advertisement
|
[x]
Attachment Details
|
||
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: 29: 30: 31: 32: 33: |
==============================
BEGIN HEAD SECTION CODE
==============================
<script type="text/javascript">
function checkAllDay(checkbox, theCommonNodeName) {
theCommonNodeName = theCommonNodeName.toLowerCase();
var theCommonNode = checkbox.parentNode;
while(theCommonNode.nodeName.toLowerCase() != theCommonNodeName && theCommonNode != document) {
theCommonNode = theCommonNode.parentNode;
}
if(theCommonNode.nodeName.toLowerCase() != theCommonNodeName) {
alert("Common parent node could not be found");
return;
}
var inputs = theCommonNode.getElementsByTagName("input");
for(var i=0; inputs[i]; i++) {
if(inputs[i].type == "checkbox") {
inputs[i].checked = checkbox.checked;
}
}
}
</script>
==============================
END HEAD SECTION CODE
==============================
==============================
CODE USED IN CHECK ALL CHECK BOX
==============================
<table width=100%>
<tr><td colspan="2"><input type="checkbox" name="chkAll" onclick="checkAllDay(this, 'table');"> Check All</td></tr><tr><td align=left><input name="9069" id="1" type="checkbox" value="ok" checked></td><td align=right>09 - 18</td></tr><tr><td align=left><input name="9070" id="1" type="checkbox" value="ok" checked></td><td align=right>17 - 02</td></tr><tr><td align=left><input name="9071" id="1" type="checkbox" value="ok" checked></td><td align=right>07 - 17</td></tr><tr><td align=left><input name="9072" id="1" type="checkbox" value="ok" checked></td><td align=right>11 - 21</td></tr><tr><td align=left><input name="9073" id="1" type="checkbox" value="ok" checked></td><td align=right>17 - 02</td></tr><tr><td align=left><input name="9074" id="1" type="checkbox" value="ok" checked></td><td align=right>21 - 07</td></tr></table>
|