View Full Version : forwarding contents from form fields

02-10-2004, 11:46 AM
Can anyone tell me how to get the contents of a form field to carry forward to another html page containing the same form field? E.g.:

<input type="text" name="email">

So if someone fills out their email address on one page and then gets forwarded to another page which again requires their email address, this field is already filled in from before.

I'd be really grateful of some help!


02-10-2004, 12:39 PM
document.form2name.email.value = window.opener.document.form1name.email.value

To refere something from the opener, use


02-10-2004, 02:44 PM
I'm having trouble defining the window.opener as a function - could you tell me how to do this please? Thank you!

02-11-2004, 05:27 AM
That code will work only if you both pages are open at the same time, meaning you open the next page in a new window. If the next page is opened in the same window, you have to pass the data through these ways (http://www.webxpertz.net/faqs/jsfaq/passvars.php).