Can you have variables inside your javascript objects. For example, would the following code work?
Let's say I have a group of checkboxes named, check1, check2, check3, ect. Up to 20...
Can I do the following...
for(var i=0; i<=20; i++){
if (window.document.form.check"+i+".checked == true){
Dome some stuff
}
}
Can I put a variable to call an object like that?
I basically need a way to loop through the checkboxes and if they are checked, than I need to validate some text boxes. But I only want to validate the text boxes, if the associated checkbox is checked.
Let's say I have a group of checkboxes named, check1, check2, check3, ect. Up to 20...
Can I do the following...
for(var i=0; i<=20; i++){
if (window.document.form.check"+i+".checked == true){
Dome some stuff
}
}
Can I put a variable to call an object like that?
I basically need a way to loop through the checkboxes and if they are checked, than I need to validate some text boxes. But I only want to validate the text boxes, if the associated checkbox is checked.