Find jobs - Submit article - Bad Credit Loans - Sport Betting Bonuses - Debt Consolidation

PDA

View Full Version : Sending a variable to another page


Zynex
Feb 20th 2007, 4:59 am
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

frankcow
Feb 20th 2007, 5:06 am
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

Zynex
Feb 20th 2007, 5:38 am
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