Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dynamic HTML Netscape Navigator (NN) 6.0 & Internet Explorer (IE) 5.0.

Similar presentations


Presentation on theme: "Dynamic HTML Netscape Navigator (NN) 6.0 & Internet Explorer (IE) 5.0."— Presentation transcript:

1 Dynamic HTML Netscape Navigator (NN) 6.0 & Internet Explorer (IE) 5.0

2 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.

3 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;

4 Element Pointer W3C recommends to get an element pointer by using getElementById. if (isIE5 || isNS6) { elm = document.getElementById("testDiv"); }

5 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"; }

6 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"; }

7 Animation Can’t directly increment the values of positioning attributes. if (isIE5 || isNS6) { elm = document.getElementById("testDiv"); elm.style.left = parseInt(elm.style.left) + 20 + "px"; }

8 More http://developer.apple.com/internet/jav ascript/nn6dhtml.html http://developer.apple.com/internet/jav ascript/sniffer.html


Download ppt "Dynamic HTML Netscape Navigator (NN) 6.0 & Internet Explorer (IE) 5.0."

Similar presentations


Ads by Google