Hi 
ive written a piece of javascript to detect the users screen res and display a different sized logo image depending on the res.
The code works fine in Internet Explorer but doesn't work in FireFox.
any idea why it doesnt work?
ive written a piece of javascript to detect the users screen res and display a different sized logo image depending on the res.
The code works fine in Internet Explorer but doesn't work in FireFox.
Code:
<script type="text/javascript">
<!--
if ((window.screen.width==1024) && (window.screen.height==768))
{
document.write('<img src="images/logo1024_768.jpg" alt="logo" class="explo_title" />');
}
else if ((window.screen.width==800) && (window.screen.height==600))
{
document.write('<img src="images/logo800_600.jpg" alt="logo" class="explo_title" />');
}
//-->
</script>
any idea why it doesnt work?












