Click here to Skip to main content
15,867,765 members
Articles / Programming Languages / Javascript
Tip/Trick

Reload page for refresh data without retry/cancel prompt

Rate me:
Please Sign up or sign in to vote.
3.67/5 (7 votes)
5 Feb 2010CPOL 82.2K   3   4
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)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionNot Working Pin
Member 1462942620-Oct-19 21:13
Member 1462942620-Oct-19 21:13 
PraisePerfect!! Pin
Raj_Rad25-Aug-16 3:56
Raj_Rad25-Aug-16 3:56 
QuestionNot Working Pin
Rohith Gopi11-Oct-12 1:50
Rohith Gopi11-Oct-12 1:50 
Questionperfect. Just what I needed thanks!!! Pin
jdzakarian@butlermfg.com19-Apr-12 5:39
jdzakarian@butlermfg.com19-Apr-12 5:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.