65.9K
CodeProject is changing. Read more.
Home

Reload page for refresh data without retry/cancel prompt

starIconstarIconstarIcon
emptyStarIcon
starIcon
emptyStarIcon

3.67/5 (7 votes)

Feb 2, 2010

CPOL
viewsIcon

83385

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