
Originally Posted by
Aravona
I was wondering if someone could point me in the right direction as to how I'd change the select all into a select / deselect?
Padonak's code will act as an 'invert all'. If you wanted a select all/deselect all:
Code:
function checkAll( field, status )
{
for (var i = 0; i < field.length; i++)
field[i].checked = status;
}
<input type="checkbox" name="delallchk" onclick="checkAll( document.form1[\'deleteall[]\'], this.checked )"/>
Where used, return should be executed unconditionally and always as the last statement in the function.
That's my signature, it's not part of the damn post!
Bookmarks