PDA

View Full Version : This Bimbo needs help please


Joe A
09-26-05, 03:27 PM
I'm adding a new page on the tour for SGD and it will be linked to from all the other pages so...

When the surfer clicks on the "Back" button on the new page, I'd like him to go back just that one page. I have looked and looked for a java script for this but :(

And I'd need to know how to link it to the button..

Ta very much

mellenig
09-26-05, 03:56 PM
Try this Joe

<a href="javascript:history.go(-1)">
Go Back
</a>

Joe A
09-26-05, 04:12 PM
Thanks Richard and it's a shame you didn't make the party last week :(

Just one question where do I add that now... I am the biggest bimbo around... LOL... Does it go in the <head> <head> or body at the top of the page or where..

Sorry mate :)

mellenig
09-26-05, 04:18 PM
yes something came up at the last minute I couldnt get out of.

Add it before your image for example

<a href="javascript:history.go(-1)">
<img border="0" src="your back button image">
</a>

Then just place on page where you want back button. It should work :)

dvtimes
09-26-05, 04:37 PM
Thanks Richard and it's a shame you didn't make the party last week :(

Just one question where do I add that now... I am the biggest bimbo around... LOL... Does it go in the <head> <head> or body at the top of the page or where..

Sorry mate :)

I had a go, it works great.

If your using a htlm package, best this to do is place a letter or number where you want the script. Thyen go into the text editor side and copy and past over the letter or number.

But you may find it better first to past

<a href="javascript:history.go(-1)">
Go Back
</a>

into a text file, then copy it (this way its pure text). Then past it into your editor.

dvtimes
09-26-05, 04:40 PM
you should get somthing like this:


Press the link to go back to the page you came from:

Go Back (javascript:history.go(-1))

Joe A
09-26-05, 05:36 PM
Now I can say thanks Richard.. It worked after about 5 attempts.. Now to add it everywhere :)

mellenig
09-26-05, 06:03 PM
No problem mate :)

uk_dude
09-27-05, 08:27 PM
The craft thing is that if you history.go(-1) to history.go(-2) it will go back two pages - may have a use somewhere