Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    forwarding contents from form fields

    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!

    Thanks,
    Beck

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    document.form2name.email.value = window.opener.document.form1name.email.value

    To refere something from the opener, use

    window.opener
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New Coder
    Join Date
    Aug 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm having trouble defining the window.opener as a function - could you tell me how to do this please? Thank you!

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,968
    Thanks
    0
    Thanked 236 Times in 233 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •