Billybonga
IS-IT--Management
i'm designing a site that is designed for a resolution 1024*768
I have written this script to detect the user's resolution and if lower than 1024*768 it would advised the user that they are not running the recommended resolution
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
document.write("This webpage is bested viewed with screen resolution "+correctwidth+"*"+correctheight+" or above. Your current resolution is "+screen.width+"*"+screen.height+". If possible, please change the resolution!"
else
document.write("If resolution is 1024*768 or above display this text." )
now this is running fine but what i was to do is add in a weblink in:
document.write("This webpage is bested viewed with screen resolution "+correctwidth+"*"+correctheight+" or above. Your current resolution is "+screen.width+"*"+screen.height+". If possible, please change the resolution!"
So that if the screen is at lower resolution it will advise the user and would have a link to a page advising how to change the resolution.
Any ideas ?
Billybong
I have written this script to detect the user's resolution and if lower than 1024*768 it would advised the user that they are not running the recommended resolution
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
document.write("This webpage is bested viewed with screen resolution "+correctwidth+"*"+correctheight+" or above. Your current resolution is "+screen.width+"*"+screen.height+". If possible, please change the resolution!"
else
document.write("If resolution is 1024*768 or above display this text." )
now this is running fine but what i was to do is add in a weblink in:
document.write("This webpage is bested viewed with screen resolution "+correctwidth+"*"+correctheight+" or above. Your current resolution is "+screen.width+"*"+screen.height+". If possible, please change the resolution!"
So that if the screen is at lower resolution it will advise the user and would have a link to a page advising how to change the resolution.
Any ideas ?
Billybong