Re: page auto reload after new window closed
| From: | Ernest E Vogelsinger | Date: | Mon, 02 Dec 2002 08:27:07 +0000 |
| Subject: | Re: page auto reload after new window closed | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126685@lists.php.net to get a copy of this message | ||
At 09:21 02.12.2002, Michael P. Carel said:
--------------------[snip]--------------------
>Sorry for this kind of post but i cant find a better mailing list for
>javascript.
>I have a problem in refreshing my php page script. Im using javascript to
>open new window for editing purposes. But i want my opener opener page to
>auto reload upon submit in my new window.
--------------------[snip]--------------------
Use JavaScript, for example. There is a window property called "opener"
which is a handle to the window which opened the popup. Upon form submit,
you could:
<script language="JavaScript">
function submitForm(form) {
document.forms[form].submit();
window.opener.location.reload();
window.close();
return true;
}
</script>
...within your form code...
<form name="myform" method="post" action="something">
...your form contents...
<button value="Submit this" onClick="submitForm(myform)">
</form>
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/