gdays guys,
found a couple of old threads which relate closely to what i want to do:
http://www.codingforums.com/showthre...e+screen+width
http://www.codingforums.com/showthre...e+screen+width
but they don't quite seem to be able to solve my problem, although they did give me a few ideas
basically, i design a web-site for my cricket club at
www.eastscricket.com.au
i want to redesign the top banner of the page, and it is looking good except for one problem.
For 800x600 screen resolutions, i have an image which makes it look perfect.
For larger screen resolution, i have a different image which makes it look perfect.
I'm trying to incorporate both images into the page but only one will show up depending on the screen resolution of the user.
the script i have in place so far is:
Code:
<html>
<head>
<SCRIPT language="JavaScript">
function loadPic()
{
sw = parseInt(screen.width);
if (sw<=800)
{
document.getElementById('image').src="icons\headers\01bottomlow.gif";
}
else
{
document.getElementById('image').src="icons\headers\01bottomhigh.gif";
}
}
</SCRIPT>
</head>
<BODY onLoad="loadPic()">
<!--irrelevant code--!>
<IMG id="image">
<--irrelevant code--!>
</body>
</html>
anyone got any ideas because i can honestly not see how that isn't coming together to work and it's getting VERY frustrating indeed
thanks for any help