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:
Supported by all browsers. DHTML is supported in every major browser, including Opera, Safari, Internet Explorer, and Firefox. These browsers are used by most of the Web-browsing public.
Open standards. Because DHTML uses standardized technologies that are open to any browser manufacturer, you can create your pages according to these standards and expect that, for the most part, they will display much the same on any major browser. Although there will be some inconsistencies in how the standards are implemented in each browser, the similarities outweigh the differences.
Change content on the fly. One of DHTML's most obvious advantages is that you can make changes to the Web page content after it has loaded, without having to reload it. This is where the dynamic in DHTML comes from.
Small file sizes. Like HTML, DHTML is created with text files, which are smaller than graphic files and generally render faster than alternatives such as Flash and Java.
Faster Web experience. You can use DHTML to hide, show, and change content without having to load new pages. This capability speeds the performance of your site by requiring fewer calls to the server. In addition, since all DHTML code is text, it allows for fast downloads when compared to other interactive technologies such as Flash.
Can add even more interaction through Ajax. As we'll explore in Part 3 of this book, DHTML and Ajax can make a powerful combination for creating responsive online applications.
It's not all smooth sailing with DHTML, however. To use DHTML, you need to understand its weaknesses as well as its strengths.
Handheld devices. Most portable devices that can access the Internet, such as PDAs and mobile phones, have limited DHTML support or do not show up as having full support. These devices are increasingly becoming a factor in Web design, and at the very least, you will need to consider alternatives to DHTML visitors using these devices.