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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamical construct document...

Status
Not open for further replies.

sepp

IS-IT--Management
Jan 27, 2001
16
0
0
AT
hi

i want to call up a js file with the variables name of a form and name of the inputfield, so that i can fill in some info

the big problem is constructin the output
which reads as following
Code:
document.formname.inputname.value=content;
if i set some variable like
Code:
var formname='form1';
it wont work

any idea

 
var formname='form1';
var content = "$12.50";

eval("document." + formname + ".inputname.value=" + content);
Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048

mikewolf@tst-us.com
 
thx a lot

works fine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top