Hello!
In my form, my checkbox elements' name are onSite[]
.
I've made a simple JavaScript to check them with one click.
function checkAll(field)
{
for (i = 0; i < field.length; i++)
field[i].checked = true ;
}
And in the HTML a button which calls the function.
<input type="button" name="CheckAll" value="All" onClick="checkAll(document.sharepage.onSite[])">
Unfortunately it doesn't work because I'm making array of the checked elements, and the []
confuse my JS.
Do you know any solution to fix it?