Connecting Tech Pros Worldwide Help | Site Map

How do avoid IE alert

  #1  
Old August 27th, 2008, 03:51 PM
Member
 
Join Date: Jun 2008
Posts: 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 .
  #2  
Old August 27th, 2008, 03:56 PM
Member
 
Join Date: Jun 2008
Posts: 40

re: How do avoid IE alert


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();


}
  #3  
Old August 27th, 2008, 04:29 PM
Member
 
Join Date: Jun 2008
Posts: 40

re: How do avoid IE alert


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.
  #4  
Old August 27th, 2008, 04:29 PM
Member
 
Join Date: Jun 2008
Posts: 40

re: How do avoid IE alert


sorry i could not change post to get.
  #5  
Old August 27th, 2008, 04:49 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,522
Provided Answers: 12

re: How do avoid IE alert


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).
  #6  
Old August 29th, 2008, 12:17 PM
Member
 
Join Date: Jun 2008
Posts: 40

re: How do avoid IE alert


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:-)
  #7  
Old August 29th, 2008, 04:04 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,522
Provided Answers: 12

re: How do avoid IE alert


Glad you got it working, though it should be more of a server-side solution rather than using JavaScript to set the iframe src.
  #8  
Old September 1st, 2008, 08:10 AM
Member
 
Join Date: Jun 2008
Posts: 40

re: How do avoid IE alert


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!
  #9  
Old September 1st, 2008, 08:51 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,522
Provided Answers: 12

re: How do avoid IE alert


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.
  #10  
Old September 18th, 2008, 03:47 PM
Member
 
Join Date: Jun 2008
Posts: 40

re: How do avoid IE alert


Thank you for the Advise :)
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch/Block-Mode updates to Select Lists - How to avoid? Richard Maher answers 16 March 25th, 2007 04:55 AM
(another) infuriating IE bug Thomas Christensen answers 9 October 16th, 2005 05:05 PM
javascript onChange event does not work in IE rick answers 4 July 23rd, 2005 11:48 AM
alert() and message window Justin Koivisto answers 9 July 20th, 2005 01:45 PM