in Advanced 

Question preview

HomeQuestion preview:
Log in

How expression is evaluated to determine type of browser?

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

Do you know someone who could answer? Ask him for help
Answers: 1
Sort by: date rating
image alexander
13:42/17.12.2007
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
Ask question
| Home | Hall of fame | Registration | Log in | Terms of service | Privacy policy | Help | Contacts | RSS |