Blog Home  Home Feed your aggregator (RSS 2.0)  
Mayur's Blog - How to refresh/reload parent web page by click event on the child window
 
# Monday, August 31, 2009

Many times we need to refresh/reload a parent window with respect to events associated on child window. For example,

1. Parent web page shows values from database.

2. An end user presses a button on the parent window. It pops up a new child windows; where the end user enters new values for database records

3. The end user presses submit button on child window. It processes code behind and updates database and closes child window after showing a relavant message.

In this situation it is a good idea to refresh the parent web page as soon as the child page is closed. This way the data on parent web page are get refreshed and the end user can get confirmation of recent chages.

The following small javaScript code will help you to achieve that.

<script type ="text/javascript" >

function refreshAPage() {

{

window.opener.location.href = window.opener.location.href;

//OR window.opener.location.href="URL";

}

</script>

Monday, August 31, 2009 11:14:59 PM UTC  #       | 
Copyright © 2022 Mayur Bharodia. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: