The answer to your IT questions
 

Advanced search  • Search tips
My QUESTIONS & ANSWERS
 Question:

How expression is evaluated to determine type of browser?

User Asked by: friending
Published on: 11:42/17.12.2007
Status: OPEN
I have this the expression which gives similarity of browser to Internet Explorer.


var IEmatch = document.all ? window.opera ? 0 : window.detachEvent ? window.createPopup ? 5.5 : 5 : 4 : 0;


Can somebody explain how this expression is evaluated in different browsers?
I know it is a bit confusing without brackets.
Any other ideas about recognizing type of browser are welcome.
Thanks a lot

 Answers: 1
Sort by: /\ date | rating
Image Answer by: alexander
Posted on: 11:42/17.12.2007
Rating: 2 from possible 5 with 7 votes
var browser=navigator.appName;
if (browser="Opera"){}
Vote:

Please vote! Your opinion matters!
If you haven't found what you've looking for, post a question
  
| Home | Hall of fame | Register | Log in | Terms of service | Help | Contacts |