By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,480 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,480 IT Pros & Developers. It's quick & easy.

help: correct size background image?

P: n/a
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?
Sep 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
sleem wrote:
I designed a little function to resize a window
Eugh. Thankfully browsers increasingly come with features that allow that
part of JavaScript to be selectively disabled.
Problem is: how do I test it?
By changing your resolution
Also, do you think that would work on all browsers?
No, certainly not.

--
David Dorward <http://blog.dorward.me.uk/ <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sep 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.