RE: design resolution question

by 2Nerotik <2nerotik(at)nisa.net>

 Date:  Tue, 21 Mar 2000 10:54:24 -0800
 To:  hwg-graphics(at)hwg.org
 References:  jps
  todo: View Thread, Original
Here is something simple I whipped up about a month ago:

<!--

function getWallpaper() {
if (screen.Width == 1024) {
         i = 0 }
if (screen.Width ==  800)  {
         i = 1 }
if (screen.Width == 640)  {
         i = 2 }

image = new Array(3);
image[0]  = "1024.jpg";
image[1]  = "800.jpg";
image[2]  = "640.jpg";

document.write('<STYLE type="text/css"> body { background: url(' + image[i] 
+ ') no-repeat fixed } </STYLE>');
   }
//** end hiding of JavaScript -->

Note the document.write could also be:
document.write('<IMG SRC="' + image[i] + '"');

Also the above script is all by itself in a file called TestScreenSize.js.

You would then put this in you HTML page:

These both go between the HEAD tags
<SCRIPT Language="JavaScript1.2" SRC="TestScreenSize.js"></SCRIPT>
<SCRIPT>  getWallpaper(); </SCRIPT>

Unless you are using the IMG version in which case the second <SCRIPT>
would go where you want the image to appear such as just after the
BODY tag if you are just using it as a splash screen.

At 09:45 AM 21/03/2000 -0500, J.P. Ambrutis wrote:
>First, I think having a jpeg of that size as a "splash page" is a mistake.
>If you insist on a splash page at all, it should serve a purpose and load
>fast.  That aside...
>
>If you really want to use this a splash page why not detect for resolution
>and redirect to the right splash page?  You can do this very quickly.  Or
>you can use a resize... not sure of the compatibility of this but it's kinda
>nifty.  http://www.ambrutis.com/splash.html

.oOo.
|| Dejaja vu: "Have we met before Ms.Gabor ?"
||
||  Addicted 2 Swing ---> http://www.nisa.net/~2nerotik/
||  Fontaholic ? ---> http://www.fontsanon.com
||  HTML Writers Guild ---> http://www.hwg.org

HWG: hwg-graphics mailing list archives, maintained by Webmasters @ IWA