Forum Moderators: open
This assignment of var1 works no problem.
function test(){
var1=form.input.value
parent.frame.document.form.input_1.value="test"+var1
}
}
I would like to use var1 on the left side of the equation but can't seem to make it happen.
parent.frame.document.form.input_(var1).value="test"
What is the correct syntax for this to work. needs to affect input_(1...2..3..etc..)based on whatever value var1 is.
Please help!
Bryn
Try something like:
var form_entity = "input_" + var1;
parent.frame.document.form[form_entity].value = ...;
Shawn
PS That should work if the code in your 1st post worked:
parent.frame.document.form.input_1.value="test"+var1
However, something makes me uncomfortable about that code... I'm a bit surprised it works... So what is the name of the form and what is the structure of the html defining the form?