home *** CD-ROM | disk | FTP | other *** search
/ PC User 2005 May / CD / PCU0505CD.iso / software / full / coffecup / files / html2005.exe / %MAINDIR% / Javascript / TestResolution.xml < prev    next >
Encoding:
Text File  |  2005-02-16  |  1.1 KB  |  40 lines

  1. <ccResource>
  2.   <ccTitle>
  3. Test Resolution
  4.   </ccTitle>
  5.   <ccCategory>
  6. Browser
  7.   </ccCategory>
  8.   <ccDescription>
  9. This javascript gives warning to users that do not use the best resolution for your web page.
  10.   </ccDescription>
  11.   <ccInstructions>
  12. The code goes only inside the BODY tags.  You can change the items below to suit your needs.
  13.   </ccInstructions>
  14.   <ccHeadContent>
  15.   
  16.   </ccHeadContent>
  17.   <ccBodyContent>
  18. <SCRIPT LANGUAGE="JavaScript1.2">
  19. var widthsetting = 800;
  20. var heightsetting = 600;
  21. if (screen.width != widthsetting || screen.height != heightsetting) {
  22. msg = "This site was designed using a resolution"
  23. + "set to " + widthsetting + "x" + heightsetting + ", "
  24. + "but your screen resolution is " + screen.width + "x"
  25. + screen.height + ".  To best view the site,  "
  26. + "please change your screen resolution, if possible.  Thanks!";
  27. document.write(msg);
  28. }
  29. </script>
  30.   </ccBodyContent>
  31.   <ccElementContent>
  32.   
  33.    <ccElementName></ccElementName>
  34.    <ccElementAction></ccElementAction>
  35.    
  36.   </ccElementContent>
  37.   <ccExtraData>
  38.  
  39.   </ccExtraData>
  40. </ccResource>