Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / Javascript

Reload page for refresh data without retry/cancel prompt

3.67/5 (7 votes)
5 Feb 2010CPOL 83.4K  
Whenever we want to refresh the parent page from child page to reload the data we use:window.opener.location.reload();This however gives a prompt retry/cancel in parent page reload which is quite annoying for the user. I found a simple trick which results in the parent page being refreshed...
Whenever we want to refresh the parent page from child page to reload the data we use:
window.opener.location.reload();

This however gives a prompt retry/cancel in parent page reload which is quite annoying for the user. I found a simple trick which results in the parent page being refreshed without the prompt. Use the below line of code:
window.opener.location.href = window.opener.location;
This simply refreshes the parent page without any prompt.

Hope someone finds this useful.

Sheetal

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)