The History of DHTML

When dynamic HTML was first being developed in the mid-1990s, Netscape and Microsoft had differing ideas about what technologies should be used to make HTML more dynamic.

Netscape-Specific DHTML

Netscape brought several new technologies to the table, hoping to create more dynamic Web pages. Unfortunately, these technologies will never become standards because CSS does most of the same things and is endorsed by the W3C.

JavaScript Style Sheets (JSS) were introduced in Navigator 4 as Netscape's alternative to CSS. Like CSS, JSS lets you define how HTML tags display their content, but JSS uses JavaScript syntax. The only browser that supports JSS, however, is Navigator 4. Not even the latest versions of Netscape or Mozilla support this defunct technology.

In addition, Netscape offered HTML layers, which, like CSS positioning controls, let you control the position and visibility of elements on the screen. Again, however, only Navigator 4 supported layers, and Netscape abandoned this technology in favor of CSS positioning. I do not recommend using Netscape layers.

Although Mozilla, and by extension Firefox, inherited the mantle of Netscape browser development, it did not continue support for the Netscape-specific DHTML extensions.

Microsoft-Specific DHTML

Much of the Microsoft-specific DHTML is based on proprietary Microsoft technologies, such as ActiveX. Because ActiveX is owned by Microsoft, it is unlikely that it will ever be a cross-browser technology. In addition, legal actions have called the use of ActiveX controls into question and at the very least will make them more difficult to implement.

Microsoft also introduced dynamic visual filters (which use ActiveX controls) that let you add visual effects to graphics and text in your document. If you've ever worked with Photoshop filters, you'll most likely also understand how to work with visual filters. The problem is that these filters are not standard on all browsers, and aren't even supported in all versions of Internet Explorer.

I do not recommend using ActiveX or its visual filters except in the few cases where a similar effect can be achieved for other browsers using standard code, such as is the case with opacity (see "Setting an Element's Opacity" in Chapter 8).

Cross-Browser DHTML

For years, the inconsistencies in supported technology between the two main browsers had Web developers who wanted to remain cross-browser compatible gnashing their teeth. Fortunately, the Netscape and Microsoft specifications for DHTML did overlap (Figure 11.5), and this area of overlap prevented DHTML from becoming just another proprietary technology.

Figure 11.5. Where the two versions of dynamic HTML overlap is where you find cross-browser DHTML, including CSS, JavaScript, and the Document Object Model (DOM).

Today, browsers implement CSS, DOM, and JavaScript standards, and the use of legacy browsers (such as Navigator 4) is diminishing, so DHTML can be used for a wide variety of applications. Although there are still browser inconsistencies, it is becoming easier to code for all browsers with minimal tweaking to accommodate the eccentricities of any particular browser.

CSS, DHTML and Ajax. Visual QuickStart Guide
CSS, DHTML, and Ajax, Fourth Edition
ISBN: 032144325X
EAN: 2147483647
Year: 2006
Pages: 230 © 2008-2017.
If you may any questions please contact us: