Sending a variable to another page

Discussion in 'JavaScript' started by Zynex, Feb 20, 2007.

  1. #1
    Hello,

    I have a little problem here. Im trying t send a variable from one document to the other. Its like this.

    I have a page with a input textfield and a button that opens a new window.

    In the new window there is another button. When this button is pushed I want a variable for instance 10 To be send and displayed in the Input textfield of the previous window (USING JAVASCRIPT).

    Could anyone help me out a bit? This is a little experiment of mine, if I manage to get this done, this will open up many new possibilities for me!

    Thank you in advance,

    Donny
     
    Zynex, Feb 20, 2007 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    Yes, it's possible, just reference the previous window with the window.opener object

    So if there's a form called 'myform' in that window, it would be window.opener.myform
     
    frankcow, Feb 20, 2007 IP
  3. Zynex

    Zynex Peon

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well that worked indeed, but while Im at it. How come when I maka a page. And then have it Pop-up in a new window.. I cannot push any of the buttons on the page :S
     
    Zynex, Feb 20, 2007 IP