This is part of a form validation script.
I put the the call to this functin behind an onclick event on a button, but
how can I access the names of all the form elements below? For starters, I
just want to print the names of each element out. IT is not working.
I know the loop is being iterated, because if I put a dumm prompt with just
text, it will print each time.
Thakns
..
..
..
..
..
..
if (!its_empty(sFu nction))
{
oForm.action = sFunction;
}
// Loop through all the form elements
for (counter = 0; counter < oForm.length; counter++) {
y = (prompt("Name of form element",oForm[counter].name))
}
}
..
..
..
..
I put the the call to this functin behind an onclick event on a button, but
how can I access the names of all the form elements below? For starters, I
just want to print the names of each element out. IT is not working.
I know the loop is being iterated, because if I put a dumm prompt with just
text, it will print each time.
Thakns
..
..
..
..
..
..
if (!its_empty(sFu nction))
{
oForm.action = sFunction;
}
// Loop through all the form elements
for (counter = 0; counter < oForm.length; counter++) {
y = (prompt("Name of form element",oForm[counter].name))
}
}
..
..
..
..
Comment