Solved

Manipulating Navigator's History Object

Posted on 1997-05-23
3
245 Views
Last Modified: 2010-05-18
Is there any way to manipulate the history list???

For example:

After a user goes through a logon screen (HTML0), I have a screen (HTML1) that upon loading (onLoad event) sets the location of the window to a diffent URL (HTML2). The problem is, is if the user clicks the back button, they are taken back to the HTML1 screen (and within a second or so placed right back in HTML2) but I want a single click of the back button to take them to the HTML0 screen where they can logon again.

More specifically:

HTML0 --> HTML1 --> HTML2
  ^---------B-A-C-K---------+

What I am thinking is that once the HTML1 page is loaded, it removes itself from the history list and then proceeds to load the HTML2 page. Therefore if the user clicks the back button, he/she will be taken to HTML0 as desired.

Can this be done???

Thank You
Chris
0
Comment
Question by:Presto
  • 2
3 Comments
 

Author Comment

by:Presto
ID: 1265783
Edited text of question
0
 

Author Comment

by:Presto
ID: 1265784
Edited text of question
0
 
LVL 5

Accepted Solution

by:
icd earned 100 total points
ID: 1265785
No. To quote from the Netscape documentation.

'Elements in the history array are read-only. For example, the statement
history[0]="http://home.netscape.com" has no effect.'

The only way you can do this is to provide your own 'back' button which when pressed will jump back two levels in the history array.

However. If you can use the 'location.replace("URL")' (Navigator 3.0) this will replace the current page with another one ***without putting an entry in the history array***

So, put the link to HTML1 as a location.replace and it will not appear in the history array and your problem is solved (I hope!)


0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question