Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set value of hidden form field 1

Status
Not open for further replies.

panini

MIS
Jun 1, 2001
136
GB
Hi Experts,

I have the following conditional which first sets the visibility of a table and then sets the value of a for object. Both the tables and the forms are created dynamically and the dynamic element of the table name always matches the dynamic name of the form. E.G:

result_1

relates to

moreInfoFrm_1


if (carTypeStr.indexOf(carTypeTemp) == -1){
document.getElementById("result_"+i).style.display="block";
document.getElementById("moreInfoFrm_"+i).location.value="123";
}


The table visibility line works fine but I am getting an error on:

document.getElementById("moreInfoFrm_"+i).location.value="123";


I guess I have the syntax wrong. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top