This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to check whether the browser is internet explorer or mozilla

 
Sekhar Chand
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic