wanaka
|
Posted: 01/13/2004, 1:21 AM |
|
From my popup windows submit button I have added this
<!-- BEGIN Button Button_Update --><input name="{Button_Name}" type="submit" value="Submit" onclick="opener.location.reload();self.close()"><!-- END Button Button_Update -->
But instead of doing a update first and close the popup windows and refresh parent, it straight away just close the popup windows and refresh parent.
|
|
 |
Edd
|
Posted: 01/13/2004, 3:23 AM |
|
The javascipt fires 1st as it is at the client.
Create a Dummy HTML page. Add a javascript function that calls the opening page and closes the window. In the Body section of the HTML add the "onload" event to call that function.
Now go back to your popup window - get rid of the onclick event and in the Return page of the form point the form to the dummy HTML page.
This allows the page to complete it's submission then redirect's itself to the Dummy HTML Page which on loading calls the javascript function which fires the reload script and then closes.
Phew....
Good luck.
Edd
www.syntech.com.au
|
|
 |
EMG
|
Posted: 01/13/2004, 9:52 AM |
|
The correct way to do this is to put this script in the after_update server event:
die( "<script>window.opener.location.reload();window.close();</script>");
|
|
 |
|