473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to Reload a Form without Getting Warning Dialog

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
editing

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

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
edited.

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?
Jul 17 '05 #1
2 8616
Nel

"Steve" <za*****@mac.com> wrote in message
news:13*************************@posting.google.co m...
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
editing

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

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
edited.

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?


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?

Nel.
Jul 17 '05 #2
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!

"Nel" <ne***@ne14.co.NOSPAMuk> wrote in message news:<41***********************@ptn-nntp-reader01.plus.net>...
"Steve" <za*****@mac.com> wrote in message
news:13*************************@posting.google.co m...
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
editing

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

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
edited.

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?


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?

Nel.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Dynamo | last post by:
Yep its me again, I have succesfully created a login page for my site. I have used the PHP_SELF so that once the user has succesfully logged on the page reloads. Everything works fine the first...
66
by: Ellinghaus, Lance | last post by:
> > Other surprises: Deprecating reload() >Reload doesn't work the way most people think >it does: if you've got any references to the old module, >they stay around. They aren't replaced. ...
4
by: Ron Lautmann | last post by:
I want to close a browser window so I created a Close button that does this: private void Button1_Click(object sender, System.EventArgs e) {...
3
by: dhnriverside | last post by:
Hi peeps I'm developing an intranet application which uses a main window and various popups created with javascript ( window.open() ). When the user saves what they are doing in the popup, i...
1
by: James | last post by:
CWinFormsDialog in .net 2.0 lets you host a .Net UserControl as a dialog in a managed C++ MDI application. I.e. in the sample: ----------------------------------------------- #include...
8
by: T. Wintershoven | last post by:
Hi all, Is there a simple way in php to reload a page coded within an if statement.(see code below) It's very important that the session stays intact. The filename is RCStudent.php ...
8
by: VUNETdotUS | last post by:
My goal is to upload files without submitting the form. I am not looking for the code here but rather a concept. I did a little research and discovered that I can submit a form to an invisible...
10
beacon
by: beacon | last post by:
Hi everybody, This is probably going to sound unorthodox, but I have to log records that are deleted...I know, go figure. Anyway, I have a form with a (continuous) subform, and on the subform I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.