Closed Bug 21373 Opened 25 years ago Closed 24 years ago

Javascript history.back, .forward, .go don't work

Categories

(Core :: DOM: Navigation, defect, P2)

defect

Tracking

()

VERIFIED DUPLICATE of bug 18321

People

(Reporter: metrol, Assigned: radha)

References

()

Details

(Keywords: crash, testcase, Whiteboard: [nsbeta2+][dogfood-])

The listed URL will take you to a listing of products, not the actual bug be
entered here.  There is a bug still active on the handling of the fonts and
mouseover graphics, #18555.  Anyhow, click on one of the products on this page
to see the detailed info.  At the top left of the product page there is a link
to go back to the previous page, which uses the following code...

<a href="javascript:history.back()" onMouseOver="status=('Go Back a Page');
return true"> &lt;&lt; Return to Previous Page</a>

I last tried using this link on the Dec 8th nightly build and it's still inop.
Functions properly in NS 4.7 and IE 5.0.  Please advise if I should post this
error in the Rhino area.
Assignee: mccabe → radha
Component: Javascript Engine → History
Nope.  Rhino is a JavaScript implementation in pure Java, and isn't part of the
Browser.  Besides, this is a problem with an API that's exposed to JavaScript,
not with the JavaScript engine itself.

Reassigning to History.  (This could be DOM level 0; but they already have
lots.)
Priority: P3 → P2
Target Milestone: M13
*** Bug 21190 has been marked as a duplicate of this bug. ***
Summary: Javascript history.back function inop → [TESTCASE]Javascript history.back, as well as history.forward function inop
Just thought of putting one testcase for this one.

STEPS TO REPRODUCE:
1] Please visit http://bubblegum/desale/his007.html  [where testcase is]
2] you'll see tow frames. One on top is navigation menu, and one in bottom is
results page.
3] Follow directions you'll see on screen while running testcase.
4] Click links on bottom frame to create history.
5] Now try BACK button. [This uses history.back()]
6] Now try FORWARD button. [This uses history.forward()]

ACTUAL RESULTS:
BACK and FORWARD buttons don't work properly.

EXPECTED RESULTS:
BACK and FORWARD buttons should work like browser buttons.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 18321 ***
Status: RESOLVED → REOPENED
[bugday] The link used on the testequity page doesn't use frames or javascript
to load new pages. I think the frame example that desale posted is probably
misleading, but I don't have access to that page. It appears that
javascript:history.back() doesn't work as an URL. I'd mark this a duplicate of
javascript URLs, but as the javascript URL problem has been fixed and this bug
at the testequity page still exists it looks like something else.
Resolution: DUPLICATE → ---
Clearing DUPLICATE resolution due to reopen.
*** Bug 22676 has been marked as a duplicate of this bug. ***
Target Milestone: M13 → M14
Moving all to M14 (for webshell changes that are being deferred till M14 rather
than destabilize M13).
Marking as beta1.
Keywords: beta1
Putting on PDT+ radar for beta1.
Keywords: testcase
Summary: [TESTCASE]Javascript history.back, as well as history.forward function inop → Javascript history.back, as well as history.forward function inop
Whiteboard: [PDT+]
Adding dependency on bug #13374.
Depends on: 13374
clearing PDT+.  I believe that this is not a stop ship, Radha is still on

sabbatical, and this is release noteable.


Keywords: relnote
Whiteboard: [PDT+]
Putting on PDT- radar for beta1. 
Whiteboard: [PDT-]
I am having a similar history problem with a test page at
http://www.vortxweb.net/ccs-pg/holidays/mz_aprilfool.shtml

The links in the body of the page cause a js alert dialog.  Using the browser
back button causes the alerts to pop back up, not go to the previous page in the
history.  Example:
1. Click on "El Cid" - alert "ha ha made you look"
2. Click on "Taily Day" - alert "kick me"
3. Click on browser back button - alert "ha ha made you look"

Not exactly where I wanted it to go... :)
Moving to M15...
Target Milestone: M14 → M15
*** Bug 31908 has been marked as a duplicate of this bug. ***
Move to M16 for now ...
Target Milestone: M15 → M16
Erm, not entirely certain what on-screen effects you're seeing, but on clicking
the javascript I'm taken to a blank, grey page with "javascript:history.back()"
in the Location field where you type urls in. I can click the back button which
takes me back to the product, then back again which takes me to the reporter's page.

Evidently javascript:history.back() is being parsed as a url for some odd reason.

This is on Linux, built from tree 2000-04-08.

The javascript showing up in the URL is new.  I believe that it is doing exactly 
what it should, process the JavaScript as a URL.  This is due to the command 
being within the href attribute.  Now if the JavaScript would actually execute 
rather than just sit there on the location bar this would be one less bug on the 
windshield.

I haven't put together a test case yet, but it is my understanding that doing 
this history back thing actually does work if instead you make it an OnClick 
event.  If I can get a chance I'll try this out and report the findings.  Might 
help a programmer narrow this one down.
Adding nsbeta2 to keywords.
Keywords: nsbeta2
Whiteboard: [PDT-]
*** Bug 37055 has been marked as a duplicate of this bug. ***
I'm reevaluating this bug in light on the new changes to the Webshell and SH and it seems to have gotten worse.



I've tested with a 2000042109 WinNT build and a 2000042508 Mac Mozilla build.



Following the original instructions renders the browser completely unresponsive after clicking 'Return to Previous Page'. Force-

quitting is the only option.

Upping severity and adding 'crash' keyword.

Severity: major → critical
Keywords: crash
OS: Windows NT → All
QA Contact: rginda → claudius
Hardware: PC → All
javascript:history.go(-1) doesn't work either (bug 37055, which was just marked 
as a duplicate of this bug).
Summary: Javascript history.back, as well as history.forward function inop → Javascript history.back, .forward, .go don't work
This also happens when you use the bug helper. If you ask to see the bugs in a
component mozilla opens up a new window with the list of bugs. If you go to one,
for example this one, you have no option of going back. Strangely enough, if you
go to another link you can go back, but still not to the original list of bugs.
I am using M15 on linux - build 2000041811.
Putting on [nsbeta2+] radar.  
Keywords: relnote
Whiteboard: [nsbeta2+]
Bug 30158 may or may not be a dupe. If anyone is working on this bug, I suggest 
they have a look at that one as well.

Gerv
Status: REOPENED → ASSIGNED
*** Bug 30158 has been marked as a duplicate of this bug. ***
Hi, using build 2000051909 I am seeing the following behavior:

1.  Using <a href="javascript:history.back();"><img ...>Back</a> either locks 
the browser or does nothing.

2.  Using <a href="javascript:alert('Clicked');history.back();"> sometimes locks 
the browser, but mostly just shows alert.

3.  Using <a href="javascript:alert('Clicked');" onClick="history.back();"> 
displays alert, but nothing else.

4.  Using <a href="" onClick="history.back();"> goes to the "./" URL (as I would 
expect).

5.  Using <a href="" onClick="history.back(); return false;"> goes to the "./" 
URL, and does nothing else.

6.  Using <a href="javascript:alert('Clicked');" onClick="history.back(); return 
false;"> alerts, then does nothing.

7.  Using <a href="javascript:alert('Clicked');" onClick="return doHistory();"> 
alerts, then does nothing.  function doHistory() { history.back(); return false; 
}

8.  Using <a href="" onClick="return doHistory();"> goes to "./" page.

  One interesting thing to note is that whenever the "./" page was returned to 
me, and I clicked the "Back" button, it actually returned me to the correct 
entry.  It is as if the history gets updated, but the incorrect page gets 
requested from the server.
Move to M18.
Target Milestone: M16 → M18
The bug that breaks javascript .go(-1) or .back don't work
on the OS/2 version of Mozilla M16 either.
Test url http://www.modenos.com/index2.html
(click on a link and press previous page)

Just wanted to let you know that its a crossplatform
bug and quite serius too.

Bug 37463 is fixed, so this bug's testcases should not freeze mozilla any more
(PC/Linux, build 2000063020).
I think this should be a dogfood bug as many javascript developers use these 
features very often. 

Activation is one of the internal customers (bugscape bug 1231). When user 
enters some invalid information activation presents the user a new page with 
error message and ask user to go back and correct the information. Activation 
javascript calls history.back() to go back to the page where user has come from. 
Right now, when user clicks on a button to go back, it won't go anywhere and 
nothing happens. So, I think this is important ot have this working as there 
might more people who might use these services. 
Keywords: dogfood
Putting on [nsbeta2+][dogfood-] radar.  Does not need a fix ASAP for daily work, 
but we should fix this for beta2. Is there a workaround for this?  If not, we 
can reconsider dogfood+.
Whiteboard: [nsbeta2+] → [nsbeta2+][dogfood-]
Proposed workarounds for this bug involve storing cleartext user password in
cookies or significant modifications in UREG2 (user registration engine),
and sending cleartext password over network few times. So this is not really the
option :-((
Radha tells me that this is essentially the same problem as bug #18321.  Radha, 
Claudius, and I agreed to make this a dup of that bug.


*** This bug has been marked as a duplicate of 18321 ***
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → DUPLICATE
yes. VERIFIED Dupe
Status: RESOLVED → VERIFIED
Is there any other possible way to simulate the browser's back button in 
Netscape?

This is very important. Because the same functionality works correctly on I.E 
5.5 but does not work on NS 6.1 . 

I'm also trying to accomplish this using JSP and Servlets in MVC model. 
If anyone know any websites or solutions to implement this please let me know. 

Thank you.
Component: History: Session → Document Navigation
QA Contact: claudius → docshell
You need to log in before you can comment on or make changes to this bug.