aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to check whether the browser is internet explorer or mozilla Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to check whether the browser is internet explorer or mozilla" Watch "how to check whether the browser is internet explorer or mozilla" New topic
Author

how to check whether the browser is internet explorer or mozilla

Sekhar Chand
Ranch Hand

Joined: Apr 05, 2006
Posts: 73
hai ranchers,

can any one know how to detect whether the browser is mozilla or explorer.
only in javascript.
if there then do reply to this topic, so that i can move forward in my project.



nani
[ December 11, 2006: Message edited by: Bear Bibeault ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What about Netscape, Opera, Safari, Firefox, Konquerer, Opera Mobile, and so on?

If you do a search on Google for JavaScript Browser Detection, there are tons of examples.

Eric
Sekhar Chand
Ranch Hand

Joined: Apr 05, 2006
Posts: 73
even i have searched alot but i didnt get correct code for that one. if you found any links please revert it back.
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

One I have found by simple search. URL

If it is not as you expect, Try THIS. you may get good ones.

[ December 11, 2006: Message edited by: Prabhu Venkatachalam ]
[ December 11, 2006: Message edited by: Prabhu Venkatachalam ]

Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
http://www.google.com/search?q=JavaScript+Detect+Browser

Same as the poster above provided has tons of results that do exactly what you ask.

Eric
Sekhar Chand
Ranch Hand

Joined: Apr 05, 2006
Posts: 73
hai eric

i know all these to find the browser other than mozilla,
but i want to detect whether the browser is mozilla or not.
I alreeady came across all the codes that you have given me, these code
checks whether the browser is explorer or navigator or geclko or other thing.
but it hasnt have whether the browser is mozilla or not.
so if you can please send me the variable name through which we can find mozilla or not.


any way thanks for your help

nani
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Browser detection is the WRONG WAY of doing this type of stuff. There are better ways to solve BAD CODING.

View Source: http://www.webreference.com/tools/browser/javascript.html

Eric
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to check whether the browser is internet explorer or mozilla