File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to check whether the browser is internet explorer or mozilla
 
Similar Threads
login user at most once ?
browser compatibilty mozila and IE
radio button using javascript DOM
Session Filter problem
Struts2.0 not working in IE