Home » Javascript

Go back link in Javascript

19 March 2008 476 views Popularity: 1% Share/Bookmark

email

I had problem giving the back link and I found this solution:

Go Back

This helped me. Hope this will be useful to you as well.

goback.html


<html>
<head>
<title>Go Back Test</title>
</head>

<body>

Go Back to Previous link, Test Page
<br/><br/>
Click the link below for the test:
<br/><br/>

<a href="goback2.php">CLICK ME</a>

</body>
</html>

goback2.php


<?php

echo "Thank You for visiting.";
echo "<br/><br/>";
echo "Please click ANY of the given link to go back to the previous page: ";

//go back to the previous page
echo "<a href='javascript:self.history.back();'>Go Back</a>  | ";

//the above link can also be used in this way
echo "<a href='javascript:self.history.go(-1);'>Go Back</a>";

?>

Thank You.

Related posts:

  1. Javascript: Show/Hide HTML elements
  2. PHP Javascript : Playing with multi-dimensional array
  3. print_r in Javascript
  4. Javascript: Add Remove HTML elements
  5. Page refresh in PHP
  6. Javascript: How to Submit form and Change form action?
  7. Javascript: How to get current URL without Query string?
  8. Javascript: Show Hide textbox text on focus
  9. Website statistic (User Information) in Javascript
  10. Making a tree navigation menu in PHP
  • http://forums.phoenixwebsolutions.net/ web forum

    very nice information.it will be helpful me a lot

  • Maj1k

    wow this is PERFECT!!! just what i needed and worked like a charm….THANKS!!!!!