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

Javascript and forms 1

Status
Not open for further replies.

wuah

Programmer
Mar 15, 2001
42
DK
Hi there

It's easy to make a javascript write to your document using: document.write(variable)

But what do I do if I want to write the variable into a textfield in a form?

Thanks...

Greetings

Rasmus
 
if in the form:
<form name=FORM1>
<input type=text name=FOO value=&quot;&quot;>
</form>

Then in the javascript:
//page.formname.fieldname.value=variable
document.FORM1.FOO.value=someJavascriptVariable

I believe that is what you are looking for..

Mike
 
This was a great help!

THANKS!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top