Hi there,
I would like to use the follwoing script for select all/ none buttons found in the archive of this forum. my problem is that my query will result in a list of checkboxes requiring me to using a div class for them
only how could I get the below script to work for me then?
Code:function checkAll() { var container; if (document.getElementById && (container = document.getElementById('cBoxes')) && container.getElementsByTagName) { var controls = container.getElementsByTagName('input'); for (var i = 0, n = controls.length; i < n; ++i) if (controls[i].type == 'checkbox') boxes[i].checked = true; } } function checkNone() { var container; if (document.getElementById && (container = document.getElementById('cBoxes')) && container.getElementsByTagName) { var controls = container.getElementsByTagName('input'); for (var i = 0, n = controls.length; i < n; ++i) if (controls[i].type == 'checkbox') boxes[i].checked = false; } }



Reply With Quote

Bookmarks