Closed Bug 215119 Opened 21 years ago Closed 21 years ago

javascript history doesn't works ok if you returns using back button

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: NetVicious, Assigned: bugzilla)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1

If you returns to a page with a button (onclick='history.go(-1)') using back
button, if you clicks on this button you will get one javascript error.

Reproducible: Always

Steps to Reproduce:
1. Send a page with a form
2. If all it's ok you gets a page with a confirmation dialog (Yes/No) created
with javascript. No button haves onclick="history.go(-1)" or one javascript
function making the same.
3. Click on yes button, you go to another page.
4. Click back, you will be on a page with the NO button with the history.go(-1).
5. Click on No button.
6. You will get one javascript error saying history object have no properties.

Actual Results:  
Javascript error and no back jump.

Expected Results:  
Go to previous page.

Sorry, I couldn't post the html pages I'm using, it a private work :-(
On a Windows box with Firebird/0.6 works correctly.
Well, perhaps it would be possible to produce a simplified testcase out of your
pages you're using? This would speed up the work on this bug...
Attached file Page 1 of testcase
Attached file Page 2 of testcase
Attached file Page 3 of testcase
Here it's a little testcase.

My pages are all php files.

While the tested pages I get one error on the 3rd page when you clicks on
javascript:history.back().

The bug occurs with history.back() and with history.go(-1), this bug works on
Firebird 0.6 under Windows XP Proff

It would be a Javascript bug.
I've also had trouble with the window.history object in Mozilla 1.5a . 
Investigation using the DOM inspector shows that for some pages the JavaScript
target->defaultView->history object is null (though for other pages the value is
valid).  This seems to depend on the page contents - if a page has a null
history, then almost identical pages from other servers will also have a null
history.

One page with the problem is http://www.sisyphus.demon.co.uk/POTOC/ .  It works
with earlier versions of Mozilla (and also with Opera and IE).
I have found the same to be true, I am running Firebird 0.6.1 on Windows XP and
I have the exact same problem.  I don't even have a form basically if you load
up a page then naviate to another page which then has a link pointing either to
javascript:history.back() or javascript:history.go(-1) either one will work
ONCE, then if you click on it and go back to the main page, if you navigate to
any other page from this point on that has a link to either of the above
functions without closing the browser and re-opening it will do nothing, and the
js console shows the history object as being null from this point on.

if you want to test go to http://www.boxxtech.com/
click on "sales inquiry" or "sales" then click the white back arrow in the 
upper left corner, click on "sales" or "sales inquiry" again and this time if 
you try to use the back button it doesn't work anymore, nor anywhere else on 
the site till you re-open the browser
*** Bug 216697 has been marked as a duplicate of this bug. ***
re: comment number 9.  Works for me using both the linux and windows 20030830
build.  Guys, please re-test and post your results using this build (or later).
Using the 0901 build I am not having the problem anymore,
I tried it up next to the standard 0.6.1 build I had,
one works the other doesn't so it appears to me to be fixed

Aaron
Ok.

Tested with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030902
Firebird/0.6.1+

Now works for me. Thanks for all the developers ;-)
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
*** Bug 215812 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: