Welcome to WebmasterWorld Guest from 54.205.88.118

Forum Moderators: phranque

Need some Java help

   
5:39 pm on Jul 24, 2001 (gmt 0)

WebmasterWorld Senior Member agerhart is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I am using Java for a small function at the bottom of the pages on my site, it is for the back button:

<a href="" onClick="parent.history.back(); return false;"
onMouseOver="self.status='Back'; return true;">

I need to get the script to use it for the forward button, but I am not sure if this can be done.

Anyone able to give me a hand?

5:53 pm on Jul 24, 2001 (gmt 0)

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Instead of <a href=" " etc., etc.>, you could put one of the following as the href:

Go back 1 page - javascript:history.back()
or - javascript:history.go(-1)

back two pages - javascript:history.go(-2)

Go forward 1 page - javascript:history.go(1)
or try - javascript:history.forward()

If I'm remembering half of that correctly, something along those lines should work. ;) But don't forget to check everything in more than one browser (I haven't got the time at the moment, but one of them might not work in NN 4.x)

(edited by: mivox at 5:55 pm (gmt) on July 24, 2001

5:54 pm on Jul 24, 2001 (gmt 0)

WebmasterWorld Senior Member agerhart is a WebmasterWorld Top Contributor of All Time 10+ Year Member



what about:
href="" onClick="parent.history.next(); return false;"onMouseOver="self.status='Next'; return true;"
5:58 pm on Jul 24, 2001 (gmt 0)

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I've never used the whole onClick function for a javascript history link... I just put the javascript directly as the <a href>. I think you could get rid of the onClick part, and keep the mouseover status part the same, and shorten everything up a bit that way.
6:00 pm on Jul 24, 2001 (gmt 0)

WebmasterWorld Senior Member agerhart is a WebmasterWorld Top Contributor of All Time 10+ Year Member



so you are saying that I should use:

href="javascript:history.forward() " onMouseOver="self.status='Next'; return true;"

or:

href="history.forward() " onMouseOver="self.status='Next'; return true;"

6:11 pm on Jul 24, 2001 (gmt 0)

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I believe Door Number 1 should do it... unless it's javascript:history.next() instead of javascript:history.forward() (when in doubt, try 'em both! ;) )

Please keep in mind I'm writing this off the top of my head while doing three other things at the same time, so don't roast me too badly if my feeble memory fails me. :)

<edit>the Typo Queen strikes again...</edit>

6:14 pm on Jul 24, 2001 (gmt 0)

WebmasterWorld Senior Member agerhart is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Thanks for the help Mivox!

I would never yell at someone for giving me a hand!......especially when it is in good nature!...and free!

 

Featured Threads

Hot Threads This Week

Hot Threads This Month