Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Object Detection using Javascript.
- From: hakan at backbase.com (Hakan M (Backbase))
- Subject: [Javascript] Object Detection using Javascript.
- Date: Fri Sep 24 04:45:13 2004
You might find this handy:
bOpera6 = (!document.createComment && window.opera);
bOpera7 = (document.createComment && window.opera);
bIE5 = (document.all && !document.fireEvent && !window.opera);
bIE55 = (document.all && document.fireEvent &&
!document.createComment && !window.opera);
bIE6 = (document.all && document.fireEvent && document.createComment);
bMozilla = (window.controllers);
The only way I have (right now) to detect Safari is through the UA, I'm
afraid.
bSaf = (navigator.userAgent.toLowerCase().indexOf('safari') != -1);
bSaf12 = (bSaf && (navigator.productSub > 20030107));
All newlines are denoted with a semicolon.
Regards,
H
Ben Crane wrote:
> Hi all,
>
> Me again, when there's one there's usually more
> questions. :)
>
> I want to do a browser check using Javascript objects
> to determine Opera, IE, Netscape, Safari, etc. but
> can't find any information or websites that cover that
> javascript objects are not covered by which website. I
> can find stuff on IE and Netscape (mainly for versions
> 3/4) but I'd like a more comprehensive list? Does
> anyone know where I can find one? I have tried looking
> under what DOM objects are not support by each browser
> but it tends to be a dead end.
>
> The reason I ask is that I use div tags (with
> overflow:scroll / hidden) for IE and NS, but since
> Opera doesn't cover overflow:scroll or hidden) I need
> to know what browsers are opening up my webpage so I
> can assign the appropriate CSS or disable Javascript.
> I have thought about using javsacript to create a
> scrollable textbox such as the one Zscrollbar I
> found-but I don't know how to create one and kinda
> want to do it myself.
>
> Regards
> Ben
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Javascript mailing list
> Javascript@xxxxxxxxxx
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
- Follow-Ups:
- [Javascript] Object Detection using Javascript : Thank You
- From: Ben Crane
- [Javascript] Object Detection using Javascript : Thank You
- References:
- [Javascript] Object Detection using Javascript.
- From: Ben Crane
- [Javascript] Object Detection using Javascript.
- Prev by Date: [Javascript] Javascript code not working in Mozzila
- Next by Date: [Javascript] Object Detection using Javascript : Thank You
- Previous by thread: [Javascript] Object Detection using Javascript.
- Next by thread: [Javascript] Object Detection using Javascript : Thank You
- Index(es):