Re: page auto reload after new window closed
| From: | Marek Kilimajer | Date: | Mon, 02 Dec 2002 10:45:15 +0000 |
| Subject: | Re: page auto reload after new window closed | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126691@lists.php.net to get a copy of this message | ||
This would prevent nonjavascript browsers from submiting the form. Better would be to use the
page that comes after submiting:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Form submited successfully</title>
<meta http-equiv="Content-Type" content="text/html">
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="window.opener.location.reload(); window.close()">
<h3>Form submited successfully</h3><br>
<input type="button" value="Close" onClick="window.close()">
</body>
</html>
Ernest E Vogelsinger wrote:
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>