Closed Bug 294775 Opened 20 years ago Closed 19 years ago

form re-posted when going back with history.back()

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: marco.baroetto, Unassigned)

References

(Blocks 1 open bug, )

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 With Firefox 1.0.4 on Windows XP: 1. Go to the specifed url. 2. Change the default values, input some text, check the box... then submit the form. 3. In the new page displayed (http://psydk.org/gecko-bugs/history-done.htm) you will find a link which calls history.back(). Click on it. 4. You are now again on the page http://psydk.org/gecko-bugs/history-done.htm instead of the first page with the form. It goes back with Firefox 1.0.4 on Windows 2000 ( but it loose the form values: see https://bugzilla.mozilla.org/show_bug.cgi?id=274399 ) Reproducible: Always
Not sure if this is related, but when viewing the page with the form (history.html), the Javascript console (configured to show full warnings) show the following: Warning: test for equality (==) mistyped as assignment (=)? Source File: http://psydk.org/gecko-bugs/history.html Line: 73, Column: 44 Source Code: if (nameValue.length = 3) { Line 73 doesn't exist, so there might be something there.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050519 Firefox/1.0+ ID:2005051914 WFM, no resubmit
Reporter: The Gecko in FF1.0.4 is over 12 months old. Please retest with a current nightly build. http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ wfm with a 4 day old Mozilla CVS build on win2k3
WFM - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050519 Firefox/1.0+
Blocks: 288462
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050927 Firefox/1.6a1 ID:2005092707 This bug can still be reproduced. I'm not sure if it's a bug though. The problem is that the second page, with the "Back" link is coded like this: <p><a href="#" onclick="window.history.back();">Go back</a></p> Instead of this: <p><a href="javascript: window.history.back();">Go back</a></p> The onclick event and href are conflicting, and that causes the reposting effect. I'm guessing the testcase code is not standard.
Flags: testcase+
(In reply to comment #6) > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050927 > Firefox/1.6a1 ID:2005092707 > This bug can still be reproduced. I'm not sure if it's a bug though. The problem > is that the second page, with the "Back" link is coded like this: > <p><a href="#" onclick="window.history.back();">Go back</a></p> > Instead of this: > <p><a href="javascript: window.history.back();">Go back</a></p> > The onclick event and href are conflicting, and that causes the reposting > effect. I'm guessing the testcase code is not standard. I had this same issue with Firefox 1.5RC2, and also with the latest Mozilla nightly build (Gecko/20051114 SeaMonkey/1.5a), so it may be a Mozilla issue or even a javascript standards issue. In my case, a form submits to a cgi script that contains a 'back' link as follows: <a href="#" onClick="javascript:history.go(-1)">try again</a> After submitting the form, then clicking on the back link, the user is taken back to the form which immediately submits again automatically. I was able to remedy this behavior by modifying the 'back' link to: <a href="#" onClick="javascript:history.go(-1);return false;">try again</a> but it is quite common to see "return false;" left off in general.
Confirmed on Firefox 1.07 Mac OS X.4.3 1. Submit a form with method="post" 2. Response come back, and all action were taken properly on server. 3. Follow a link 4. Use the BACK button Step 4 resubmits the POST rather than merely reloading the URI in the form action attribute.
*** Bug 322552 has been marked as a duplicate of this bug. ***
this works in 1.5 and above -> WFM
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.