View Full Version : Question about browser navigation
upuaut
April 18th, 2003, 08:06 PM
I'm wondering if anyone knows a way to SET the previous page in a browser so that when a user clicks on the back button they go to that page.
Anyone have an idea?
Alex
April 18th, 2003, 08:16 PM
<script>
/*
Back home button-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
function gohome(){
if (document.layers)
window.home()
else if (document.all)
window.location="about:home"
else
alert("You need NS 4+ or IE 4+ to go back home!")
}
</script>
<form>
<input type="button" onClick="gohome()" value="Take Me Home!">
</form>
<!--if you wish to use an image instead of a form button, uncomment this portion
<a href="javascript:gohome()"><img src="http://dynamicdrive.com/dynamic.gif"></a>
-->
i know that there is an easyer way, let me search some more, this has alot of code, i know that there is one with only aboue 6 lines. i will be back in a couple of min;)
Alex
April 18th, 2003, 08:18 PM
never mind about the first code,
<a href="javascript:history.go(-1)">go back</a>
http://www.javaworld.com/javaworld/javatips/jw-javatip15.html
hope this helps:)
upuaut
April 18th, 2003, 08:23 PM
I hope so too. I'll let you know. Thanks for the info.
Alex
April 19th, 2003, 12:39 PM
your welcome
did it work? :)
lostinbeta
April 19th, 2003, 12:44 PM
You could just use...
<A HREF="javascript:history.forward()">Go Forward</A>
and
<A HREF="javascript:history.back()">Go Back</A>
Jubba
April 19th, 2003, 01:02 PM
I think he is asking if you can SET the back button. Like he doesn't want them to just go back a page he wants to dictate which page they go to when they click the back button...
lostinbeta
April 19th, 2003, 01:05 PM
Then why not hard code it?
eyezberg
April 19th, 2003, 05:32 PM
how can you hard code browser buttons?
lostinbeta
April 19th, 2003, 05:45 PM
AHHH, I am so confused.
Is this browser buttons? Or HTML created links?
Is this a back button? Or a button that links back to a certain page?
If it is browser buttons, you can't change the function of those.
Alex
April 19th, 2003, 05:53 PM
what is hard code. :(
reverendflash
April 19th, 2003, 05:55 PM
no variables...
Revhttp://www.aulman.com/rev.gif
upuaut
April 20th, 2003, 11:57 PM
ok.. well the solution came through other means. but I'll let you know what it was I was asking.. that's the least I can do. :)
The deal was. I had a redirection page. Normally when you redirect your audience, and they use their back button, they go to the last page and then get redirected right back where they were instead of getting out of your pages. I was attempting to find a method of by passing the redirect page in the cache of "back pages" that were stored in the browser so that a use of the back button on the entrance page would send the user to their previous location on the web.
lostinbeta
April 21st, 2003, 12:36 AM
Ohhhhhhh, I gotcha.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.