frank grimes
02-15-2008, 11:33 PM
Hi--
I'm looping through some form fields and need to concatenate their values, but all I get is the last value.
My code:
for (var i=1;i<=document.getElementById("rows").value;i++) {
var url="sanitycheck.php?parts=";
if (eval("document.assemblies.tb_partnum"+i)) {
a=document.getElementById("tb_partnum"+i).value;
url=url+a;
}
}
What's going on?
Thanks for the help...
grimey
I'm looping through some form fields and need to concatenate their values, but all I get is the last value.
My code:
for (var i=1;i<=document.getElementById("rows").value;i++) {
var url="sanitycheck.php?parts=";
if (eval("document.assemblies.tb_partnum"+i)) {
a=document.getElementById("tb_partnum"+i).value;
url=url+a;
}
}
What's going on?
Thanks for the help...
grimey