• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11239
  • Last Modified:

The page cannot be refreshed without resending the information

How can i get past the annoying "The page cannot be refreshed without resending the informationetc.. hit RETRY or Cancel "??

On some pop windows after they are closed the parent page refreshes okay but on other parent pages i get the above warning, what is causing this and is there a way around this ?

<a href = "#" onclick = " window.opener.location.reload();self.close();">CLOSE WINDOW</a>

Cheers

JT
0
jturkington
Asked:
jturkington
  • 6
  • 5
  • 2
4 Solutions
 
cyberdevil67Commented:
Hi jturkington,

 you are refreshing a page that has sent information to server, in a form. So when you refresh the page this information is being sent again and this is why you are getting this information.

Cheers!
0
 
mrichmonCommented:
WHat is causing this is that a form posted to get that page.

There is no way around it without rewriting your code/logic.

It is a built in browser security feature.

The line you showed is not causing it alone.  It is in combination with other factors.
0
 
jturkingtonAuthor Commented:
I am open to changing this as i am in the middle of designing the application

What do you propose?, cflocation ?
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
mrichmonCommented:
Depends on what you are doing.  Can you post a description of the logic of how a user gets to this page and why they click this link.

Also then we may need to see some of the code...
0
 
jturkingtonAuthor Commented:
Okay i have an intranet with alot of popups at present. When a user adds/edits/deletes in a pop window i send them to a page called success.cfm within the same popup: -

<div align="center">
      <h3>Successful</h3>
      <br /><br /><br />
      <a href = "#" onclick = " window.opener.location.reload();self.close();">CLOSE WINDOW</a>
                OR
      <a href = "#" onclick = "self.close();">CLOSE WINDOW</a>
</div>

The user then see the successful message and clicks on the close button which updates the parent page with the new details. Most of my pages are self posting forms and then i use cflocation to move them to different forms.

eg..

<form name="dsp_form" id="floatlabel"  action="dsp_form.cfm<cfif cgi.query_string NEQ "">?<cfoutput>#cgi.query_string#</cfoutput></cfif>" method="post">

</form>

Hope this helps
0
 
cyberdevil67Commented:
First I would not be using pop ups, but as this is an intranet the I guess your ok here.

What you could do is post pack to the same page, with another variable. Say reload=true and then browser will think that it is a different URL.

But instead of location.reload, how about location.assign instead that way your opening the page up and then not sending anything back either
0
 
jturkingtonAuthor Commented:
is there any way to use cflocation with cgi variables ?
0
 
cyberdevil67Commented:
sure

<cflocation url="#cgi.remote_host#">
0
 
jturkingtonAuthor Commented:
So i could have just a page called

success.cfm

and redirect all add/updates deletes that are successful to it, which will in turn close the current window and refresh the parent page behind

How do i go about firing up the cflocation with a <a href> close window</a> on the success.cfm page or should i use a timer of some sort ??

<form name="dsp_success"  action="dsp_success.cfm<cfif cgi.query_string NEQ "">?<cfoutput>#cgi.query_string#</cfoutput></cfif>" method="post">

   <cflocation url="#cgi.remote_host#">

    <a href = "#" onclick = "self.close();">CLOSE WINDOW</a>
</form>

 
0
 
cyberdevil67Commented:
You could still do it the way you were doing it. Just don't use location.reload

use location.assign = "index.cfm" instead. This doesn't reload the page but instead calls another page stopping the problem you had.
0
 
jturkingtonAuthor Commented:
But i need the parent window to refresh ?
0
 
cyberdevil67Commented:
then

parent.document.location.assign = "index.cfm";

0
 
jturkingtonAuthor Commented:
Sorry Guys for not responding, thanks for the comments
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now