Results 1 to 4 of 4

Thread: javascript history back - Make it go previous page

  1. #1
    Join Date
    Apr 2009
    Posts
    745

    javascript history back - Make it go previous page

    I need to put a javascript:history.back() button navigation to web page links. Could any one of you can make me know how to do this using javascript and html links ?

    Could we make it go 2 pages or so, as per we need ?

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: javascript history back - Make it go previous page

    Yes, you can make it go 2 pages or 1 page back as per your need.The code we'll use look a bit like this: "javascript:history.go(-1)" .

    With that code we are telling the browser to go back -1 page. You can change the -1 number to any page history like -2 or -5. So if you choose go back -3, you will send the visitor three pages back in their browser history.

    Here’s the source code:
    <a href="javascript:history.go(-1)">Go Back One Page </a>

  3. #3
    Join Date
    Feb 2009
    Posts
    266

    Re: javascript history back - Make it go previous page

    may be due to different browser it doesn't work

    i try this and it works

    javascript: window.history.go(-2) for 2 pages.

    make it dynamic if using ASP

    javascript: window.history.go(-<%if not request("error")="" then response.write "2" else response.write "1"%>);

    Reply With Quote

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

    Re: javascript history back - Make it go previous page

    You can even Download Unified Back-Forward Button 0.6 for the same.

    Firefox extension that will provide a unified button to your browsers toolbar for the back and forward buttons Unified Back-Forward Button customizes your toolbar by adding a double-button with just one drop-down menu for navigating back and forward. Like this, you can see all the history of one tab and quickly navigate back and forward through it. If there are too many entries, youll additionally get Fast-Rewind/Fast-Forward entries to skip intermediary pages.

    AFTER THE INSTALLATION, youll have to CUSTOMIZE THE TOOLBAR and replace the traditional back-/forward-buttons with this new one.

Similar Threads

  1. Replies: 2
    Last Post: 23-02-2012, 12:14 PM
  2. How to Roll Back Virus Signature to previous one
    By Jokull in forum Networking & Security
    Replies: 3
    Last Post: 22-12-2010, 06:57 PM
  3. Previous Page button skips back multiple pages on Kindle
    By Reema_n in forum Portable Devices
    Replies: 4
    Last Post: 19-03-2010, 01:50 PM
  4. History Object In JavaScript
    By ramsun in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 10:17 AM
  5. Unable to resolve the problem of javascript:history.back()
    By Saaarc in forum Software Development
    Replies: 3
    Last Post: 22-09-2009, 01:52 PM

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,711,704,280.72207 seconds with 17 queries