Dynamic HTML Netscape Navigator (NN) 6.0 & Internet Explorer (IE) 5.0
Both IE 5.0 & NN 6.0 are moving to support World Wide Web Consortium's (W3C) recommendations for the Document Object Model (DOM), Cascading Stylesheets (CSS) and ECMAScript.
Detecting Browsers isNS4 = (document.layers && !document.getElementById) ? true : false; isIE4 = (document.all && !document.getElementById) ? true : false; isIE5 = (document.all && document.getElementById) ? true : false; isNS6 = (!document.all && document.getElementById) ? true : false;
Element Pointer W3C recommends to get an element pointer by using getElementById. if (isIE5 || isNS6) { elm = document.getElementById("testDiv"); }
Style & Visibility W3C enforces the style group and the use of “visible” instead of “show” for the visibility attribute. if (isIE5 || isNS6) { elm = document.getElementById("testDiv"); elm.style.visibility = ”visible"; }
Units The W3C requires a unit of measure (usually pixels) attached to size or positioning. if (isIE5 || isNS6) { elm = document.getElementById("testDiv"); elm.style.left = "300px"; }
Animation Can’t directly increment the values of positioning attributes. if (isIE5 || isNS6) { elm = document.getElementById("testDiv"); elm.style.left = parseInt(elm.style.left) "px"; }
More ascript/nn6dhtml.html ascript/sniffer.html