Firefox JavaScriptProblem

SpaceshipSpaceship
SpaceshipSpaceship
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
Close
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
Close
Works in Netscape 7.1 too (which uses the same engine as Firefox). Which version of Firefox are you using?
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back