Click to See Complete Forum and Search --> : Browser detection and compliancy


nobru
02-27-2003, 03:34 AM
Hi there,

I am a newbee to JS, so sorry if my question sounds stupid...
I wanna use browser detection and so on, but I do not know if there are some compliancy problems, e.g. if some "attributed" would not be reconized by all browsers.

Below is the list of attributes I'd like to use; could someone tell me if some of them are not reconized by/compliant with some browsers?

window.screen.colorDepth;
window.screen.width;
window.screen.height;
window.screen.availWidth;
window.screen.availHeight;
window.screen.fontSmoothingEnabled;
window.screen.colorDepth;
navigator.javaEnabled();
navigator.appName;
navigator.appVersion;
navigator.appCodeName;
navigator.platform;

ANd how can I make error handling in JS?
If "window.screen.fontSmoothingEnabled" is not reconized by IE3.0 for instance, would this line of code prevent the error message from appearing:
if(!window.screen.fontSmoothingEnabled) { ...//not reconized, then assign a default value
?

Thanks in advance for any help, could not find any answer on tutorials about that till now...

gil davis
02-27-2003, 06:52 AM
Window object

for NS:

http://developer.netscape.com/docs/manuals/js/client/jsref/window.htm

for IE:

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_window.asp

navigator object

for NS:

http://developer.netscape.com/docs/manuals/js/client/jsref/nav.htm

for IE:

http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_navigator.asp