W
WindAndWaves
Hi Gurus
I am sorry to ask so many questions, but unfortunately, you are just such an
awesome source of knowledge that I can not help myself but ask lots. One
day, I hope to be able to answer other people's questions.
Here we go, I have the following function (I made it myself ...!)
function tic(form,a,z){
for(f=a;z;f++){
if(form[f].type=="checkbox"){
form[f].checked=true;
}
}
}
It is supposed to tick a range of tickboxes (e.g. 1-10 or 11-30), I want to
use a and z to identify the range.
I use the following to call the function:
<LABEL FOR="0">
<INPUT TYPE="checkbox" VALUE="0" NAME="0" CLASS="ix"
ONCLICK="tic(this.form,0,1);">
New Zealand Wide</LABEL>
However, even with a range from 0 to 1, it will tick all the boxes in the
form. Secondly, does anyone know how to make the reverse function? Can I
add a fourth variable that indicates whether the current tickbox is true or
false and then use this in the function?
I hope it all makes sense
Thank you once more for all your help
- Nicolaas
I am sorry to ask so many questions, but unfortunately, you are just such an
awesome source of knowledge that I can not help myself but ask lots. One
day, I hope to be able to answer other people's questions.
Here we go, I have the following function (I made it myself ...!)
function tic(form,a,z){
for(f=a;z;f++){
if(form[f].type=="checkbox"){
form[f].checked=true;
}
}
}
It is supposed to tick a range of tickboxes (e.g. 1-10 or 11-30), I want to
use a and z to identify the range.
I use the following to call the function:
<LABEL FOR="0">
<INPUT TYPE="checkbox" VALUE="0" NAME="0" CLASS="ix"
ONCLICK="tic(this.form,0,1);">
New Zealand Wide</LABEL>
However, even with a range from 0 to 1, it will tick all the boxes in the
form. Secondly, does anyone know how to make the reverse function? Can I
add a fourth variable that indicates whether the current tickbox is true or
false and then use this in the function?
I hope it all makes sense
Thank you once more for all your help
- Nicolaas