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 ?
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 ?
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>
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
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.
Bookmarks