• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • Last Modified:

Back button link and Forward Button Link

Hi guys!
Hope you are well.
What Id like to do on a page is to create 2 links.
The first would be a Back link, so for example, whatever page

Curent Page = A
Go to Page = B
On Page B, if I click on an image that says "Back", it takes me back to Page A.
So, if my history of pages that I visited was:
Page A ----> Page B ----> Page C----->   Page D
If Im on Page D, if I keep clicking on Back, it takes me to Page C, then B, then A.

Same logic but in reverse for a Forward Button link.

Any help greatly appreicated.
0
Simon336697
Asked:
Simon336697
1 Solution
 
frinCommented:
Use JavaScript's history function:

<a href="javascript:history.go(-1)">Back</a>

You can set -1 to some other value
0
 
Simon336697Author Commented:
Hey frin :>)
Thank you ! you are sooo fast :>)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now