fuBar. Posted October 12, 2006 Share Posted October 12, 2006 I know some folks use this. I would like a script that can automatically redirect to the previous page that you were on. For example, page A -> Click to page B -> redirects to page A -> current page A Simple. Thanks. Link to comment Share on other sites More sharing options...
0 JMann Veteran Posted October 13, 2006 Veteran Share Posted October 13, 2006 Maybe I am just thick, but I can't work out what your trying too say but the only kind of thing I can think of is a little bit of JavaScript in the form of: <a href="java script:history.back(1)"><< Back</a> Link to comment Share on other sites More sharing options...
0 Mouldy Punk Posted October 13, 2006 Share Posted October 13, 2006 I know some folks use this. I would like a script that can automatically redirect to the previous page that you were on. For example, page A -> Click to page B -> redirects to page A -> current page A Simple. Thanks. Not sure what you mean, if you mean like as soon as Page B is loaded, it automatically goes back to Page A, you could use the following PHP code on page B; Header('Location: PAGEA'); Where "PAGEA" is the URL of Page A. Link to comment Share on other sites More sharing options...
0 fuBar. Posted October 13, 2006 Author Share Posted October 13, 2006 Ops sorry, I wasn't too clear, I have it in my mind, but I didn't clarify. I have multiple pages on my website, hence there are various pages that a person can go to before clicking on a page that has the redirection. <a href="java script:history.back(1)"><< Back</a>, yes that the one I am looking for, but is there any script that uses the history.back automatically, like automatic page redirection? When you visit a page, it redirects you automatically to the previous page you were on. Thanks. Link to comment Share on other sites More sharing options...
0 rson451 Posted October 13, 2006 Share Posted October 13, 2006 on the page that you want to be redirected just do this <script>history.go(-1)</script> Link to comment Share on other sites More sharing options...
0 fuBar. Posted October 13, 2006 Author Share Posted October 13, 2006 on the page that you want to be redirected just do this <script>history.go(-1)</script> Okay, thanks. Link to comment Share on other sites More sharing options...
Question
fuBar.
I know some folks use this.
I would like a script that can automatically redirect to the previous page that you were on. For example, page A -> Click to page B -> redirects to page A -> current page A
Simple.
Thanks.
Link to comment
Share on other sites
5 answers to this question
Recommended Posts