1261Chapter 47 .Cross-Browser Dynamic (Ecommerce web host) HTML Issues Standards for

1261Chapter 47 .Cross-Browser Dynamic HTML Issues Standards for CSS, DOM, and ECMA scripting have been well covered earlier in this book. The purpose of this chapter is to demonstrate approaches to accommo dating the sometimes vast differences in specific implementations of these tech nologies (including browser-specific variations) to produce content that runs on as many DHTML-capable browsers as possible. Most of the problems, as you are well aware from Chapters 15 and 31, are caused by page authors trying to develop for essentially three different document object models: NN4, IE4+, and W3C DOM (as implemented in IE5+ and NN6). Striving for Compatibility With as many as three object models to support (you can, of course, elect to support only a subset of browsers if you like) you should look for ways to minimize your pain. If the NN4 object model is in your mix, you will very likely experience moments of sheer torture, as you try to get even the CSS-supported HTML to behave as it does in browsers of the other object models. Thankfully, the NN4 browser s installed base is shrinking, but for some page authors, it can t disappear quickly enough. Two keys to survival are among the object models: knowing each DOM s limitations and finding common denominators. In the area of DHTML limitations, NN4 is the clear winner. Compared to the auto matic content reflowing of IE4+ and NN6, the NN4 object model is painfully static. For example, dynamically changing the color of a chunk of text in response to a rollover is a difficult task in NN4 requiring the careful positioning of a layer atop main page text; and making any inline modification to content (other than swapping an image of the same size) is completely out of the question. Between the IE4+ and W3C DOMs, the biggest differences fall more along operating system and browser brand lines. Microsoft takes advantage of the integration of the IE browser and the Windows operating system to such an extent that it can provide IE services that work only on Windows versions of IE. IE/Mac users are out of luck (for data binding or text filters, for instance), as are NN6 users. Looking for areas of commonality or at least gaining a clear understanding of where the models diverge can be a tedious, yet personally rewarding pursuit. For example, one of the biggest problems facing designers for all three DOMs is the way scripts must reference elements that are to be moved or hidden (something that all three object models can do). NN4 requires references that take the layer object structure into account; IE4+ has the Microsoft syntax of document.all, which pro vides a reference avenue to any element whose ID attribute is set; and the W3C DOM (as implemented in IE5+ and NN6) users a finger-twisting (albeit now industry standard) document.getElementById() method to obtain a reference to any ID d element. As soon as your script has a valid reference to an element, the next step is to read or write some property, or invoke some method of that object that governs the ele ment s position (and possibly other style) attributes. Here, again, the object models diverge, but not quite as severely. NN4 has a singular implementation that provides properties and methods of positioned elements (layerobjects) directly; the IE4+ and W3C DOMs, on the other hand, work their positioning magic through the styleprop erty of a positioned element. In some cases the last-dot property names are identical across all three models (for example, document.myLayer.zIndex, document.all.
We recommend high quality webhost to host and run your jsp application: christian web host services.

Leave a Reply