Re: Build a form that returns to the parent window
| From: | Markus Wolff | Date: | Wed, 03 Oct 2007 20:16:22 +0000 |
| Subject: | Re: Build a form that returns to the parent window | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44123@lists.php.net to get a copy of this message | ||
This is not really a database question, but here's something to point you in the right direction...
In your main page insert this Javascript function:
function sayHello(name) {
alert("Hello "+name);
}
In the newly-opened window (it's important that this window has been opened by the main page, preferrably using window.open()), do this:
<input type="text" onchange="window.opener.sayHello(this.value);" />
This should do the trick for you. The "opener" property of the window object holds a reference to the main window.
CU
Markus
Thodoris schrieb:
Hi guys, I have been working on a project for some time now and I'm trying to make a form that includes (many things and) an edit box with a button by it. I want this button to open a pop-up window and include a search form that queries a database and return to its self the result set in a table in which the last cell contains a link (or button). This link should return to the parent window a value of this specific row. Well I have build the whole interface and since php is server side I thought I could write this including javascript. Non of my experiments worked because the pop-up window does not returm to the parent window something. I searched through the web and nothing seems to do the magic for me. Please any suggestions would be welcome cause I have been working on this for several hours as we speak.-- Markus Wolff -Development- NorthClick GmbH Gasstr. 10 - 22761 Hamburg Tel.: 040 8 22 44 999 - Fax: 040 8 22 44 998 Internet: http://www.northclick.de/ Geschäftsführer: F. Detzner | M. Henze | C. Springub Amtsgericht Hamburg, HRB 94459