Screen Resolution DetectorThis is a cool trick which is best used to make sure that the layout of your screen is kept consistant and clean - by making sure your visiter has the right resolution. An ecample of this is if your page has a title image 600 pixels wide, and the viewers screen resolution is 640 by 40, there will be a horizontal scroll bar on the page (a big no-no). Using this script will allow you to alert the visiter of their resolution, and if it is wrong, alert them to change it. Here is an example script of a resolution detector for less then 1280 by 1024. Here is the script:
Thats all there is too it. Add this script to your <head> tag. You can change everything in red, to customize it for your page. To load this at start up, add 'onLoad="detect()"' to your <body> tag. If you want to add it to a link or button, add 'onCLick="detect()"'. Good Luck! |
Home | Tutorials | Files | Forum | Links | Contact Me | Portfolio All content on this p |