By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

How do avoid IE alert

P: 40
i am trying refresh the iframe, ie browser

gives me the below alert.

The page can not be refreshed with out resending the information.click retry to send the information again or click Cancel to return to the page that you were trying to view.

i am expecting your valuble comments on
why am i getting this warning.and
how to avoid this warning.

Please help me .
Aug 27 '08 #1
Share this Question
Share on Google+
9 Replies


P: 40
The below shown is the code that i am trying to refresh the iframe.

for(i=0; (a = document.getElementsByTagName("iframe")[i]); i++)
{

a.contentWindow.location.reload();


}
Aug 27 '08 #2

P: 40
I am in situvation where i could not change any of my get to post method, with out changing get to post, is there any way to avoid this alert.
Aug 27 '08 #3

P: 40
sorry i could not change post to get.
Aug 27 '08 #4

acoder
Expert Mod 15k+
P: 16,027
This alert popup appears because you've posted something and then you're refreshing the page. This will cause the form to be re-submitted. This may be unwanted, e.g. if you've just made a payment. To avoid this, use Post/Redirect/Get (PRG).
Aug 27 '08 #5

P: 40
Hi All
Thanks for the reply Acoder. The link given was helpful.

i have solved the above problem, using the below code.

for(i=0; (a = document.getElementsByTagName("iframe")[i]); i++)
{

a.src=a.src;


}

Happy to be a member of this forum:-)
Aug 29 '08 #6

acoder
Expert Mod 15k+
P: 16,027
Glad you got it working, though it should be more of a server-side solution rather than using JavaScript to set the iframe src.
Aug 29 '08 #7

P: 40
oh...what's wrong with this solution?

will it fail in any case?I am not aware of the impact of this solution i just tried it


Please Advise!
Sep 1 '08 #8

acoder
Expert Mod 15k+
P: 16,027
I'm not sure if it will cause a problem or not, just that I didn't have that in mind. If you look at the link(s), the solution is server-side, so after the post request is accepted, the page redirects using the location header to a different page using a GET request. I'm assuming the reason why your solution works is that you were posting to the same page rather than a different action page.
Sep 1 '08 #9

P: 40
Thank you for the Advise :)
Sep 18 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.