A
Anna
Hi all.
I have a javascript function that loops throught all text boxes inside
a form:
var elems = document.formName.elements;
for(i = 0; i < elems.length; i++) {
if(elems.type && elems.type.toLowerCase()=="text")
do something
}
This way it goes through every single text box in the form.
But in my form structure, some form elements (text boxes included)
are inside invisible divs.
And what I actually want to do, is to check only the text boxes
that are not inside invisible divs.
Is there a way to say in javascript something like:
choose only textbox that is not inside element (div) whose
className='invisible'?
Or maybe I should try a different approach, instead looping through
all form elements?
Thank you very much for your help.
Sorry if I'm asking stupid questions, I'm not very good with
javascript yet.
Anna
I have a javascript function that loops throught all text boxes inside
a form:
var elems = document.formName.elements;
for(i = 0; i < elems.length; i++) {
if(elems.type && elems.type.toLowerCase()=="text")
do something
}
This way it goes through every single text box in the form.
But in my form structure, some form elements (text boxes included)
are inside invisible divs.
And what I actually want to do, is to check only the text boxes
that are not inside invisible divs.
Is there a way to say in javascript something like:
choose only textbox that is not inside element (div) whose
className='invisible'?
Or maybe I should try a different approach, instead looping through
all form elements?
Thank you very much for your help.
Sorry if I'm asking stupid questions, I'm not very good with
javascript yet.
Anna