Click to See Complete Forum and Search --> : Back() and "a name" Question
Khrysller
03-07-2003, 09:53 AM
Hello People,
I am building a page with a "Back" link, and inside this page I have some internal links (a name), and when the user uses these internal links, and after hit the back button, the page go back, of course, but inside the page, ok itīs "normal", but I am looking for a script to ignore these internal links (if used) and go back to the page that the user came from.
Thanks in advance.
I think what you are going to have to do is keep track of what page they browsed to your page from using the query string. You can than make you back button link to the value of the query string... Let me know if you need more help with this.
Khrysller
03-07-2003, 11:00 AM
Originally posted by pyro
I think what you are going to have to do is keep track of what page they browsed to your page from using the query string. You can than make you back button link to the value of the query string... Let me know if you need more help with this.
Ohh I really need help :)
I am understanding what you are saying, but I do not not enough of javascript to do this, if you have some code, please, let me know :)
(sorry my weird english)
Thanks a lot.
Ok on your main page, make a link like this:
<a href="khrysller2.htm?khrysller1.htm">khrysller2.htm</a>Where krysller2.htm is the name of your secondary page, and where krysller1.htm (after the ?) is the name of the page you are currently on.
Then on krysller2.htm make some code like this:
<html>
<head>
<title>Your Title</title>
<script language="javascript" type="text/javascript">
function goback()
{
browsedfrom = String(window.location).split("?");
window.location.href = browsedfrom[1];
}
</script>
</head>
<body>
<a href="nonjavascriptpage.htm" onClick="goback(); return false">Go back</a>
</body>
</html>