ok, sorry this may be a bit of a javascript question - but hey, it want be the first !!
I am looking to do a multiple checkbox checker thing (like hotmail). I have code to check all but I want it to uncheck all also:
Here is my attempt, its not working though ??
<script>
function check()
{
temp = document.main.elements.length ;
var c=0;
for (i=0; i < temp; i++) {
if( document.main.elements.checked=1😉 { c++; }
}
if(c !== 0) {
for (i=0; i < temp; i++) {
document.main.elements.checked=1;
}
} else {
for (i=0; i < temp; i++) {
document.main.elements.checked=0;
}
}
}
</script>
<a href="#" onclick="check()">ALL</a>
any ideas ???