Results 1 to 6 of 6

Thread: History Object In JavaScript

  1. #1
    Join Date
    Nov 2009
    Posts
    117

    History Object In JavaScript

    Hello, I have started learning java script recently and required some more details in the History Object in Javascript. If anyone is having more details about it, then please reply me about it, It will be helpful to me to get the more details about it while making use of it. I have read some of the details about it in the book, but that is not sufficient.

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: History Object In JavaScript

    The object javascript History lets move in the history of your browser.
    If history is empty or if the page you requested does not exist (history.go (60000)), it is not nothing. It also provides you the following methods:
    • history.back ()
    • history.forward ()
    • history.go ()

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: History Object In JavaScript

    History object in JavaScript provides you the following:
    Properties :
    • current - running document URL.
    • length - Total no. of entries present.
    • next - URL of the next document
    • previous - URL of the previous document.

    Methods:
    • back() :
      Code:
      <FORM>
      <INPUT TYPE="button" VALUE="Go Back" onClick="history.back()">
      </FORM>
    • forward():
      Code:
      <FORM>
      <INPUT TYPE="button" VALUE="Go Forward" onClick="history.forward()">
      </FORM>
    • GlobalSpec :
      Code:
      <FORM> <INPUT TYPE="button" VALUE="Go Back" onClick="history.go(-1)"> </FORM>

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: History Object In JavaScript

    General use of History:

    By subject History which is in the JavaScript object hierarchy in object window, You have access to WWW pages that were visited by the user. Key to access is the list as it is saved in the browser history, accessible from the Netscape menu Window / history (Communicator / history). With this object, you can build such links like "Back to last visited page.

    Examples:
    history.back ();
    window.history.back ();
    secondefenetre.history.back ();
    parent.frames [2]. history.back ();

  5. #5
    Join Date
    May 2008
    Posts
    2,389

    Re: History Object In JavaScript

    If you want to make use of the javascript History object then you must make use of the JavaScript object which is accessible through the history property of a window object. It also provide you the property of the window.history which is an array of URL strings which reflect the entries in the History object. It also consist the different array of URLs. You can simply change the running URL by simply changing the entry from it. For that you simply make use of the History object by using the location.replace method.

  6. #6
    Join Date
    Feb 2008
    Posts
    1,852

    Re: History Object In JavaScript

    I am not having more details about it, but I have got the code below for the Methods of History Object:
    back():
    Code:
     function funback()
                 {
                      window.history.back()
                 }
    forward():
    Code:
     function funfor()
                 {
                      window.history.forward()
                 }
    go():
    Code:
                 function funfor()
                 {
                     window.history.go(1)
                 }

Similar Threads

  1. How to setup a JavaScript Object Notation variable?
    By hatred in forum Software Development
    Replies: 4
    Last Post: 04-02-2010, 02:25 AM
  2. Date Object In Javascript
    By Level8 in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 12:07 PM
  3. JavaScript - The window object
    By Sheenas in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 11:38 AM
  4. Location Object In JavaScript
    By technika in forum Software Development
    Replies: 5
    Last Post: 23-01-2010, 09:24 AM
  5. JavaScript: RegExp and Boolean Object
    By Ivann in forum Software Development
    Replies: 5
    Last Post: 18-12-2009, 03:36 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,966,483.07181 seconds with 17 queries