Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't go BACK

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Hi,

I have 2 versions of a page, (iewelcome and nswelcome) -- the user passes through a browser detection page which then redirects them to the relevant page depending on their browser.

My problem is once the user arrives at iewelcome the "Back" button on the browser brings them back to the browser detection page and thus they end up at the same page.

Is there a script where I could program the "Back" button on the browser to go back 2 pages? Or another way around this?

Thanks,
Tim
 
Well if calling window.history(-1) calls back, try calling history(-2)? Makes sense to me, I don't know if it works, otherwise you could just call it twice in a row.

If neither of these work, you will have to use a query string.

For security reasons the actual URLs are not exposed, so you can't do any matching or aything like that.

-Ben "Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer"
 
Thanks for that Ben,

except how could i imlpement that code for the back button?
 
Just make your own button and call it from there. I don't know if you can actually disable the browser one - but having one there on the page will probably stop them using that one anyway.

The browser back button just calls history.back(-1);

Sorry I can't be more help! _Ben "Alright whatever man, I'll hook up the hair, but I aint touchin the ring...Cause I'm still a pla--yer"
 
i answered this one in the ?hmtl&css forum? (or in the allaire one ?) !!! you can't override the back button, but instead of calling the page, just history.replace it !! (other answer is more detailed ;])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top