Re: design resolution question

by "Harlequin" <deconstruction(at)telus.net>

 Date:  Tue, 21 Mar 2000 12:43:56 -0800
 To:  <hwg-graphics(at)hwg.org>
 References:  jps nisa
  todo: View Thread, Original
Only problem with the "screen.Width == 1024" script below is that your only
checking if the resolution "is equal to" 1024 or "is equal to" 800 pizels
wide. I'd add some greater than or less than arguments in there just in
case. There are some funky resolutions out there like mine, which is running
at 2048x768 on a dual 19" monitor setup.....

Bob
DeConstruction web Design
http://www.de-construction.com
ICQ 3194762



> 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>');
>    }
> file://** 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