Web Hosting - Debt Consolidation - Credit Card - Internet Advertising - Wordpress Themes

PDA

View Full Version : How to reload the previous page?


khwab
Aug 22nd 2006, 1:50 am
Hello,

In my first window i am opening a new pop up window and i am uploading the image and then i am closing the window using window.close , Now what i want is my first page should automatically get refresh when my pop up window get close.

Can anybody help me with it?

I have seen this feature in www.naukri.com , here when i click on edit profile , new page gets open and after upldating the profile new page gets close and old page gets reloaded.

Thanks in advanced.

Khwab

Cholt
Aug 22nd 2006, 6:25 am
You can use the opener object to reference the page that opened the current one and call a method on it.

For example:

From popup window:

opener.Refresh();

You could add a Refresh method to your parent page and then you could call it when the pop window is closing.
There might be a more elegant way as I am not a Javascript expert but this would probably work.

PS. Just in case you didn't know you can reload a page by calling location.reload(true) to for a reload of the current page from the server.