funkyjunky Posted January 15, 2007 Share Posted January 15, 2007 Hey guys!Ok here is an easy one for you!Say i have an image (call it bckhome.jpg) When somebody clicks this image i want them to go back to the page they visted previously.Is this possible??Ed Link to comment Share on other sites More sharing options...
Escee Posted January 15, 2007 Share Posted January 15, 2007 <a href="java script:history.go(-1)">GO BACK</a> Yep But if you're user is coming for Google or so, he will be returned to Google. But you can check on that with a if-statement if you want to Link to comment Share on other sites More sharing options...
vytas Posted January 15, 2007 Share Posted January 15, 2007 He wanted to click the image not a link.Just do this <html><body><script type="text/javascript">function goback(){document.location="http://www.runescape.com";}</script><img src="img.jpg"onclick="goback()"></body></html> But then the history.go(-1)like escee said Link to comment Share on other sites More sharing options...
Escee Posted January 15, 2007 Share Posted January 15, 2007 I think he can implement that himself Link to comment Share on other sites More sharing options...
vytas Posted January 16, 2007 Share Posted January 16, 2007 ok but here's code <html><body><script type="text/javascript">function goback(){history.go(-1)}</script><img src="img.jpg"onclick="goback()"></body></html> Link to comment Share on other sites More sharing options...
funkyjunky Posted January 16, 2007 Author Share Posted January 16, 2007 Thankyou!!I will test it in a sec.cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now