Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Redirect script has same effect as disabling Back button



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
ganton1



Joined: 11 May 2007
Posts: 1
Location: Canton, GA (Atlanta)

PostPosted: Fri May 11, 2007 11:14 pm    Post subject: Redirect script has same effect as disabling Back button Reply with quote

I've inserted a bit of JavaScript between the HEAD tags in my Web site's HTML so that when a viewer lands on the Home page, (s)he will be redirected to a given "start" page based on the browser's resolution settings, for example, a "start800.html" page or a "start1024.html" page. Now that the site is live on the server, I've discovered that, because a given "start" page is actually the second page in the process, the viewer will get stuck in a loop if trying to use the browser's "Back" button; (s)he will always end up at the redirected (second) page, which makes sense. This has the same effect as disabling the browser's "Back" button. I don't want to do that to my viewers. How can I fix this? One example line of the script looks like this:
<SCRIPT LANGUAGE="javascript">
if (screen.width == 1024)
{parent.location.href='./html/start1024.html'}
</SCRIPT>
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap