How to Reload a Form without Getting Warning Dialog

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm working in PHP, but am also using JavaScript, so perhaps there is
a better way to do this using more PHP code......

I setup a search screen for my database, the user enters data and
submits a form via POST

From that I get a results list screen, based on data I submit via a
form from the search screen

In the results list screen, I have a button next to each record for

When clicked, a new window is spawned, letting the user enter the

When the user clicks save, the data is saved, and the resulting
"success" response page then issues a "reload" javascript statement to
the parent window (which is the search resulsts window), to refresh it
to update the list of found results since once of them has just been

In mozilla, this works if the parent window was generated via GET, but
in this case, the parent window was generated via POST, so I get a
warning like:

"The page you are trying to view contains POSTDATA. If you resend the
data, any action the form carried out will be repeated...."

Which is annoying, and confusing to users for my purposes.

Is there some other way I can accomplish this "reload" function of the
parent window when working with POST data without getting this dialog?

The only method I can think if is to get the base URL, and then parse
the submited FORM data into a URL string so I essentially turn the
POST DATA into a GET URL string. This would seem to be a bit of work
for every form on my site that uses this functionality, so I was
hoping I was missing a more obvious solution?

Re: How to Reload a Form without Getting Warning Dialog

Quoted text here. Click to load it

Not sure if this is the best idea, but one solution could be to process the
POST data in a php script, assign the variables to a session, validate the
variables and then user header("Location: nextpage.php") to move the user to
a page that is not processing POST data.  Therefore, when refreshed it will
not ask to resubmit the data?


Re: How to Reload a Form without Getting Warning Dialog

I finally got something to work...what I did was that I put some code
in to convert the POST data to GET data and reload the form that way
via JavaScript. At first I thought it would be messy, but once I got
into it, the solution turned out to be fairly elegant. At least for a
newbie like me!

Quoted text here. Click to load it

Site Timeline