lazytrucker
Programmer
Hello all, I have been trying to do this for some time now and with no success.
I have an onchange function which has to populate some form fields depending on what var is passed.
The function goes like this.
function func(val)
{
var call
call="document.fexp.a"+val; //val = 1
alert(call.value); //this returns undefined
alert(document.fexp.a1.value); //this returns the correct value
}
Is there any way to address form elements using the passed variable??
Any suggestions much appreciated
Cheers Lazy Trucker