TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Image Swapping Script

Page: 1 Reply
Nov 3rd 2001#19654 Report
Member since: Apr 7th 2001
Posts: 366
Hey all I'm looking for a script that will detect what resolution a monitor is set at and then will load the appropriate graphic for that resolution. Is there anything out there like this?? I thought I saw one day but I'm begining to think I just thought I saw one that did this. Well if you can help me thanks a whole bunch, from me and my school to you.
Reply with Quote Reply
Nov 3rd 2001#19671 Report
Member since: Mar 20th 2001
Posts: 3367
function redirectPage() {
var urlless = "frameset_home_lo_res_popup.htm";
var url640x480 = "frameset_home_lo_res_popup.htm";
var url800x600 = "frameset_home_lo_res_popup.htm";
var url1024x768 = "frameset_home.htm";
var url1152x864 = "frameset_home.htm";
var url1280x1024 = "frameset_home.htm";

if ((screen.width < 640) && (screen.height < 480))
window.location.href= urlless;
else if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else if ((screen.width == 1280) && (screen.height == 1024))
window.location.href= url1280x1024;
else window.location.href= url1024x768;
}

onLoad="redirectPage()" <<= don't forget to add that in your body

it redirects to the html file.. maybe you can play with it
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum