Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 14-04-2009
Member
 
Join Date: Apr 2009
Posts: 732
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 ?
Reply With Quote
  #2  
Old 14-04-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
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:
Quote:
<a href="javascript:history.go(-1)">Go Back One Page </a>
Reply With Quote
  #3  
Old 14-04-2009
Member
 
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
Reply With Quote
  #4  
Old 14-04-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "javascript history back - Make it go previous page"
Thread Thread Starter Forum Replies Last Post
Is it possible to get back on the previous version of saved Excel file M.N.S MS Office Support 2 23-02-2012 12:14 PM
How to Roll Back Virus Signature to previous one Jokull Networking & Security 3 22-12-2010 06:57 PM
Previous Page button skips back multiple pages on Kindle Reema_n Portable Devices 4 19-03-2010 01:50 PM
History Object In JavaScript ramsun Software Development 5 29-01-2010 10:17 AM
Unable to resolve the problem of javascript:history.back() Saaarc Software Development 3 22-09-2009 01:52 PM


All times are GMT +5.5. The time now is 12:26 PM.