Im trying to get some checkbox with a specific name
document.getElementsByName("test");
Unfortunatley i cant check if it is checked or not here is the code
for(i=0;i<check.length;i++)
{
if(check[i].checked==true)
{
alert(check[i].value);
}
}
Is somewhere a typo?
jQuery would be nice for these basic things.
But you aren’t using jQuery so:
instead of just
Also, you can remove
==true, so you get:Which makes much cleaner code.
Also, are you sure you set the name of the checkboxes to “test” (sometimes people forget these things, like me every time ^^)
jQuery Example
First, download jQuery from http://jquery.com/
That should do it.
If you aren’t familar with jQuery, look at this: http://docs.jquery.com/Tutorials:How_jQuery_Works