Home > WebEOC > Admin Guide > Board Building Tips > Check All Datalinks from a Checkbox

Check All Datalinks from a Checkbox

Table of contents
No headers

To select or deselect all data links from a single check box, add the following into the <head> section of the page:

<script type="text/javascript">
var LT = String.fromCharCode(60);

function checkAllDataLinks(obj)
{
  var checkBoxes = document.forms[0].getElementsByTagName('input');
  for (var i = 0; eval(i + LT + checkBoxes.length); i++)
  {
    if (checkBoxes[i].getAttribute('name') == 'datalinkid' &amp;&amp; checkBoxes[i].getAttribute('type') == 'checkbox')
      checkBoxes[i].checked = obj.checked;
  }
}
</script>

Then, add the following in the location on the board where you want the check box to appear:

<table width="100%" border="1" cellSpacing="0" cellPadding="1">
<tr>
<td style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; FONT-FAMILY: Arial" align="right" width="25%" background="" bgColor="#dcdcdf">
All Datalinks
</td>
<td style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; FONT-FAMILY: Arial" background="" bgColor="#dcdcdf">
<input type="checkbox" name="allDatalinks" value="" onclick="checkAllDataLinks(this);"/>
</td>
</tr>
</table>
You must to post a comment.
Last modified

Tags

Classifications

This page has no classifications.