Forums

ASP

This topic is locked

Refresh Page after update record

Posted 13 Dec 2003 22:53:13
1
has voted
13 Dec 2003 22:53:13 Mr. em posted:
I have a detail page that displays the product information,
On that page (product_detail.asp) I would like to create a link
"Update Product Image" on that product_detail.asp and once its clicked it will open up a new popup window just infront of the product_detail.asp page
(480 x 300) with a form option to browse and upload the new image

After they brows and upload the new image with update record behavior and the record was update with the new image, once the user close that winodw
I want to show the new image in the product_detail.asp page whitout
Hitting refresh on the browser, I have seenig that in many places
I am wondering if anyone knows the code behind that


Thanks

Ej


ej malahi

Replies

Replied 15 Dec 2003 03:21:40
15 Dec 2003 03:21:40 Phil Shevlin replied:
Use javascript. There's more than one way to do it, but I do it this way. Create a close.htm page:
<pre id=code><font face=courier size=2 id=code>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;script language="JavaScript1.1" type="text/JavaScript1.1"&gt;
function closeWindow() {
opener.location.href = opener.location.href;
self.close();
}
&lt;/script&gt;

&lt;/head&gt;
&lt;body onLoad="closeWindow()"&gt;

&lt;/body&gt;
&lt;/html&gt;
Then set the "redirect after update" page to clode.htm
</font id=code></pre id=code>
Replied 16 Dec 2003 12:53:29
16 Dec 2003 12:53:29 Rene Bandsma replied:
We use always the following command:
&lt;meta http-equiv="pragma" content="no-cache"&gt;

When the user has updated the page, the page will load itself again. The meta command is getting the values from the server and not the cache.

Reply to this topic