...

View Full Version : Only open new location 1st time.



elcaro2k
06-28-2004, 11:05 PM
I have a login screen that opens a customer services page. I have logic that opens a different location for certain customers which works fine. The problem is that when the user clicks the back button for the initial customer service page it throws them back to the other location because of my logic. Is there a way that I only throw this page the first time I land on the customer service page?

In other words we want to throw certain customers this special page, but they need to be able to navigate to the customer service page as well.

Roy Sinclair
06-30-2004, 07:49 PM
Set a "session cookie", to indicate they've been redirected once and then don't redirect if the cookie is present. As a session cookie goes away when the browser is closed, the next time they visit (assuming they've actually closed the browser) they get redirected again. You can also fairly short cookie expiration to overcome the "they didn't close the browser between visits" problem as well.

elcaro2k
06-30-2004, 08:10 PM
Thanks Roy. That is what I finally figured out as well. I wasn't familer with cookies using javascript, so this was an enlightening process.

Thanks again!!!
Ray



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum