Refresh your parent Window after closing pop up window

You could refresh your parent window after closing the pop up window from many methods. From those method some is given blow.

1. Firstly You can make function and call this function where you need this code. The code is given blow

<script language="JavaScript">
<!--
function refreshParent() {
window.opener.location.href = window.opener.location.href;

if (window.opener.progressWindow)

{
window.opener.progressWindow.close()
}
window.close();
}
//–>
</script>

You can use this code with out function also

2. Second method is given blow

window.close();
if (window.opener && !window.opener.closed) {
window.opener.location.reload();
}

Paste this code on your web page where you want to use it

If you want to use in code behind : Use given vlow code

Response.Write("<script>window.close(); if (window.opener && !window.opener.closed) { window.opener.location.reload(); </script>");

Note:

These all code will be write at the pop up window web page

Bansal Sumit

To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.