Jeune 0 Report post Posted November 13, 2005 My dad has a Nokia communicator, that phone which looks like a small laptop, and so I tried to look at my My Webpagewith it. The communicator uses the Opera browser and as it turned out, my javascript, a counter that counts how many days before my birthday and christmas didn't display the number of days correctly.So while I am trying to discover how it will wok in Opera, I would barr people using Opera browsers from my site. Problem is I don't know Opera's appname.Can anybody tell my what it is?My code will looke like this if (navigator.appName="Whatever Opera's app name is") { my code etc etc; } I know internet explorer's appName is Microsoft Internet Explorer andFirefox's is Netscape. Is Opera's appName Opera? Share this post Link to post Share on other sites
slu 0 Report post Posted November 20, 2005 My code will looke like this if (navigator.appName="Whatever Opera's app name is") { my code etc etc; } I know internet explorer's appName is Microsoft Internet Explorer andFirefox's is Netscape. Is Opera's appName Opera? 204420[/snapback] No, Opera's appName is Netscape! It might seem weird, but it has been chosen for compatibility reasons.... You need to check the User Agent String to detect whether a Opera browser is used. The User Agent String will include the name "Opera", so your code could be written like this: if ((navigator.userAgent).indexOf("Opera") != -1) { your code etc etc;} If you really want to go in to the gory details of browser detection check out the Browser Capabilities Project. Share this post Link to post Share on other sites
Tyssen 0 Report post Posted November 21, 2005 You're gonna bar Opera users from your site just cos a javascript counter doesn't work properly? Share this post Link to post Share on other sites