GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 2.50 average.
  #1  
Old 01-Dec-2003, 11:37
pcxgamer's Avatar
pcxgamer pcxgamer is offline
Senior Member
 
Join Date: Sep 2002
Location: South Carolina, USA
Posts: 1,060
pcxgamer is a jewel in the roughpcxgamer is a jewel in the roughpcxgamer is a jewel in the rough

JavaScript Resolution Redirection Tutorial


This script will redirect a user based on his screen resolution.
This isn't the way it's normally done but I like it, so I thought
I would post it to help others. What this script does is it takes
the screen width and height and adds then together. Then adds them
to the variable resolution. 1024+768=1792 is if the variable resolution
is grater than or equal to 1792 it goes to the first page if not it
goes to the second one. Here the code I hope you all enjoy this script.

Code:
<script type="text/javascript"> <!-- Hide script var resolution = window.screen.width + window.screen.height; if (resolution >= "1792") { document.location = "1024x768_page.html"; } else { document.location = "800x600_page.html"; } // End hiding --> </script>
__________________
If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
We're looking for JavaScript codes / mini tutorials. JdS Web Design Forum 7 31-Mar-2008 23:25
How do you detect resolution & launch an app with Javascript? rhino1616 Web Design Forum 16 01-Dec-2003 11:00
JavaScript Tutorial Part 1 pcxgamer Web Design Forum 2 01-Dec-2003 09:16
Javascript: Pop Up Tutorial BobbyDouglas Web Design Forum 0 20-Nov-2003 22:19
screen resolution zuzupus Web Design Forum 0 29-Jul-2003 02:50

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 05:05.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.