I need a script that checks resolution and if the resoulution is 800by 600 it will insert image a
if resultion is 1024 by768 it will insert image b
Any help would be great thanks
06-23-2002, 03:31 AM
Internet search for "resolution sniffer" produced DHTML Shock - Other - Resolution Sniffer (http://www.dhtmlshock.com/other/ResolutionSniffer/default.asp) specifically for 800 x 600 and 1024 x 768 resolutions to redirect with instructions.
06-23-2002, 04:20 AM
I appreciate the post but that isnt what Im looking for.
If resoultion is 800 by 600 document write (pic url)
If resolution is 1024 by 768 document write (alt pic url)
06-23-2002, 07:22 PM
Ok I have a simpler script that I tested in the three browsers in my sig and at both resolutions.
Just replace the current image tag in your page scripting with the above script changing the imagea.jpg and the width=512 height=384 to fit your "a" image in your root folder for the 786/1024 statement and the same for the 600/800 statement with your "b" image specifications.
Note: Must change your monitor resolution to preview the result as it goes by the real monitors resolution set and not a web editors screen size emulation.
This is exactly what I had in my head. I knew I saw document write based on resolution in scripts before. FOr isntance "Y our using a 800 by 600 resolution" So i fgured it could be done. Thanks for the help!