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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing history

Status
Not open for further replies.

kwilliams29

Programmer
Mar 7, 2001
13
US
I have read posts about replacing history, but I am still confused.

I have a starting page LOGIN.htm

After the user successfully logs in on LOGIN.htm, they are taken to LAUNCH.asp

Using meta-equiv Refresh, after a set number of seconds, the user is taken to SessionOver.htm which I have set to location.replace to LOGIN.htm.

However, after the LOGIN.htm loads, I can still use my back button to get to LAUNCH.asp.


What I want to have happen is this:

1. Login using LOGIN.htm
2. LAUNCH.asp displays for XX seconds
3. User is taken to SessionOver.htm. If they click on the "Login" button on the page, they go to LOGIN.htm If they use the browser's BACK button, they are taken to LOGIN.htm.
3. User is returned to LOGIN.htm (and previously submitted login values are cleared from fields)
4. User trying to back or forward cannot hit LAUNCH.asp and cannot get back to LOGIN.htm with entered login values.

I'm certain there is a way to do this, but I don't know what it is.

Thanks for any help.
 
....location.history.replace("url");
 
I tried that. I put it on the SessionOver.htm page and it goes back to the LOGIN page as I expected, but I can still click the back button and get to the LAUNCH page.

Should I be putting it on a different page? If it needs to go on the LAUNCH page, how can I do that and still have the XX seconds setTimeout?

Thanks.

 
page1 --> page2
page1.location.history.replace("page2") will jump from page1 to page2 and remove page1 from the history list
do this for every link and you'll have no back button anymore (but to leave your site ;] !)
----
use the javascript function setdelay or settime or setintervall to time out your page (i don't remember which is the exact name and NO i don't have time to go on devedge or msdn ref for you - neither to perform a search here - but i know the answer has been giiven a few times)
-----
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top