View Full Version : Can i control a browser backbutton with code ??


Jessie_James
06-21-2005, 12:44 AM
HI,

As my site is using 4 iframes most of the time via one link you have to click the back button 4 times to get it to the first page. I know i could just make a link to the start page. But i was wondering is there a html code for controlling the back buttton so it goes back pages instead of frames.

pretender
06-21-2005, 01:46 AM
This one for history go back change -1 to how many pages you want to go back

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

or link to you begining page

<a href="http://name of begining page.html">Home</a>

Jessie_James
06-21-2005, 02:35 AM
Dont both of these refer to a link on my website???

I was wondering if i can control the Browser Back button. Not the links on the page being veiwed.

kittycat
06-21-2005, 03:39 AM
No, not the browser button... the code posted makes your own kind of back button that you may be able to control page changes in the way you want.

Jessie_James
06-21-2005, 05:03 AM
Thought so , thanks alot for answers.