I am working on Joomla. I want to create a button so that if I click on that button browser redirects to previously processed page.How to make a button to act like browser's back button? This question was asked earlier here.I tried all those solutions. but none is working for me. Plaese answer this question. Thanks in advance.
Asked
Active
Viewed 1,876 times
2 Answers
4
JavaScript button:
<button onclick="window.history.go(-1)">Back</button>
Source: Go back button in a page
Community
- 1
- 1
Alexander Grooff
- 63
- 6
-
-1 for copying my answer. – Shomz Mar 31 '14 at 09:42
-
Actually, I got it from http://stackoverflow.com/questions/13511679/go-back-button-in-a-page. It's a duplicate post really. – Alexander Grooff Mar 31 '14 at 09:43
-
Yeah, but still, should've left your original one. It's not cool. – Shomz Mar 31 '14 at 09:43
-
My apologies, I'm still new here :) – Alexander Grooff Mar 31 '14 at 09:44
-
@shomz...that solution is not working for me.that is why I posted the question again.So that I could find some new solutions.Butttt :( – pk2218 Mar 31 '14 at 10:05
2
<button onclick="window.history.back()">Go back</button>
Read more about it here: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history
Try the button here: http://jsfiddle.net/GTQ48/
Shomz
- 36,910
- 3
- 55
- 83