help: correct size background image?

Giganews Newsgroups
Subject: help: correct size background image?
Posted by:  sleem (ha…@asifIdgiveoutmyemail.com)
Date: Sun, 03 Sep 2006

I designed a little function to resize a window based on the clients
screen resolution, and apply an appropriate background image.

function resize_2_spec()
{
if (screen.width>640)
{
window.resizeTo(800,600);
document.body.style.backgroundImage = 'url(images/brunswickst600x800.jpg)';
}
else
{
window.resizeTo(640,480);
document.body.style.backgroundImage = 'url(images/brunswickst480x640.jpg)';        
}
}

Problem is: how do I test it?

What's the easiest way?

Also, do you think that would work on all browsers?

Replies