Ok here is my problem. I have an array of checkboxes created dynamically from the database. I have a button that when clicked I want it to select all the checkboxes on the form. I realize this should be a fairly easy and seems to be quite common as I have already used the search tab to do some research and as far as I can tell, what I have looks ok. However this is not saying much. So please if anyone can add some insight it would be greatly appreciated. My code is as follows:
<p> <input type="button" onClick="SelectAll()" value="Select All" name="SelectAll"></p>
function SelectAll()
{
var i;
var form = document.FORM1;
for(i = 0; i < form.elements.length; i++)
{
if(form.elements.type == "checkbox"
{
form.elements.checked = true;
}
}
}
the error at the bottom of my browser(NS)is as follows :
Javascript error: Type 'javascript:' into Location for details.
I am not sure what this error means either. Does anyone know what location to type 'javascript:' in, cause I sure would like some details.
Thanks again - Rory
<p> <input type="button" onClick="SelectAll()" value="Select All" name="SelectAll"></p>
function SelectAll()
{
var i;
var form = document.FORM1;
for(i = 0; i < form.elements.length; i++)
{
if(form.elements.type == "checkbox"
{
form.elements.checked = true;
}
}
}
the error at the bottom of my browser(NS)is as follows :
Javascript error: Type 'javascript:' into Location for details.
I am not sure what this error means either. Does anyone know what location to type 'javascript:' in, cause I sure would like some details.
Thanks again - Rory