[Javascript] insert value into form field

Colin Cochrane colin at vfs.com
Mon Jun 3 10:24:52 CDT 2002


>   e  Hi,   How do I insert a  variable into a form field without using
>document.write.   eg. I have a value  in variable called xyz.   The form
>is called  f1, the field is called t1. How do I get xyz into f1.t1?  
>phill  

window.document.f1.t1.value=xyz;

(I hope those are 'ones'.)

You need to explicitly say "give the value of the variable xyz to the value
property of the form object t1, which is in the form object named f1, which
is in the document, which is in the window.

cdc


Colin Cochrane
Head Instructor
Vancouver Film School New Media
http://www.vfs.com/
Tel: (604) 685-6331 Ext 209
Fax: (604) 685-6308

Vancouver Film School. Creative. Disciplined. Focused.





More information about the Javascript mailing list