Firefox JavaScriptProblem

SpaceshipSpaceship
Watch

explosive

New Member
Impact
0
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. :(

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?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Works just fine in my Firefox 1.0
 
0
•••
Works in Netscape 7.1 too (which uses the same engine as Firefox). Which version of Firefox are you using?
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back