-
including a variable
if i put a line of code like that :
document.forms[0].nameoftextbox.value
between the nameoftextbox and value, i want to include a variable in that line so i'll be looping
that the names nameoftextbox_1
nameoftextbox_2
nameoftextbox_3
nameoftextbox_4
nameoftextbox_5
for...x...{
alert(document.forms[0].nameoftextbox_x.value
}
is there a way
-
sure..
you can use:
Code:
var objTextBox;
//loop with x
objTextBox = eval('document.forms[0].nameoftextbox_' + x);
alert(objTextBox.value);
//until x=whatever
Blade
-
Thank you very much
EVAL....that was the thing
you've been a great help
-
Okay, I think we should start ignoring cross posters.