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 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.
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.
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).
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.
Why Should I Use DHTML?
Because you purchased this book, you've already made some commitment to using DHTML. But in case you haven't bought the book and are just flipping through and looking at the cool examples, let me try to make a balanced case for why you should use DHTML in your Web designsand warn you about some of the troubles you may face.
Obviously, DHTML is not without its advantages or no one would use it. It has taken a few years, however, for the power of DHTML to be realized. Here are some advantages to using DHTML:
It's not all smooth sailing with DHTML, however. To use DHTML, you need to understand its weaknesses as well as its strengths.