history undefined

I want to place a 'Back' button on a document, and I want to use the History object. However, when I enter
window.document.write(window.history.previous),
I get 'undefined' as a result. Where is the history file located? My search indicates that the file is located at
c:windowshistory odayMy Computer.
How does my browser (IE 5.00) know where to get this data? or... is there another location where the history file is kept?
zapper

Comments

  • : I want to place a 'Back' button on a document, and I want to use the History object. However, when I enter
    : window.document.write(window.history.previous),
    : I get 'undefined' as a result. Where is the history file located? My search indicates that the file is located at
    : c:windowshistory odayMy Computer.
    : How does my browser (IE 5.00) know where to get this data? or... is there another location where the history file is kept?
    : zapper
    :

    You don't have access to the locations in the History. You can navigate the history by going forward or back, but for privacy / security reasons you can't get the value of that item.
  • : : I want to place a 'Back' button on a document, and I want to use the History object. However, when I enter
    : : window.document.write(window.history.previous),
    : : I get 'undefined' as a result. Where is the history file located? My search indicates that the file is located at
    : : c:windowshistory odayMy Computer.
    : : How does my browser (IE 5.00) know where to get this data? or... is there another location where the history file is kept?
    : : zapper
    : :
    :
    : You don't have access to the locations in the History. You can navigate the history by going forward or back, but for privacy / security reasons you can't get the value of that item.
    :
    : Thanks for the info! I didn't consider the security aspects of this.
    However, the good news is that all I wanted to do, in the first place, was to go back one step in the history file. I have a document with a button which, when pressed, opens a new document. On this new document, I have a button which, when pressed, reurns me to the original document.
    It was here that I wanted to go back in the history file. I probably could do better to use a window.close() function, but I wanted to experiment a little with something that I know nothing (obviously) about. Thanks again.
    zapper


  • : : : I want to place a 'Back' button on a document, and I want to use the History object. However, when I enter
    : : : window.document.write(window.history.previous),
    : : : I get 'undefined' as a result. Where is the history file located? My search indicates that the file is located at
    : : : c:windowshistory odayMy Computer.
    : : : How does my browser (IE 5.00) know where to get this data? or... is there another location where the history file is kept?
    : : : zapper
    : : :
    : :
    : : You don't have access to the locations in the History. You can navigate the history by going forward or back, but for privacy / security reasons you can't get the value of that item.
    : :
    : : Thanks for the info! I didn't consider the security aspects of this.
    : However, the good news is that all I wanted to do, in the first place, was to go back one step in the history file. I have a document with a button which, when pressed, opens a new document. On this new document, I have a button which, when pressed, reurns me to the original document.
    : It was here that I wanted to go back in the history file. I probably could do better to use a window.close() function, but I wanted to experiment a little with something that I know nothing (obviously) about. Thanks again.
    : zapper
    :

    Well navigating the history can be done with history.back(), history.forward() and history.go(x) with x being the number of items to move forward or back. So history.go( -2 ) will take you back two pages.

    And I stand a little corrected on my previous claim, it appears that Nestscape 4 (and maybe later versions, but only Netscape) does allow you to access history.previous which holds the previous history entry.

    Anyway if you want to learn more about JavaScript then http://www.javascriptmall.com/learn/contents.htm is a nice place to start.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories