Web server hosting - 98 Part III . Document Objects Reference Of

98 Part III . Document Objects Reference Of the three models, NN4 s DOM is the trickiest one to deal with at the HTML level. While it may be possible that your content design will look the same using positioned DIV and SPAN elements in all DHTML-capable browsers, often the appearance in NN4 is unacceptable. At that point, you will probably have to use scripts in your Body to dynamically generate HTML, specifying the tag for NN4 and positioned

elements for the rest. Note Although IE4 and IE5.x can use the same basic Microsoft object model, not all DHTML code renders the same on both generations of browsers. Microsoft made some changes here and there to the way some style attributes are rendered so that IE5.x comes into better compliance with the CSS recommendation. Using script libraries As long as you plan to use scripts to dynamically generate HTML for the page, you might consider creating separate, external .jslibraries for each of the object models you want to support for the page. Scripts in each library contain code for both the HTML accumulation (for use with document.write() in the main page) and for processing user interaction. Assuming that only DHTML-capable browsers reach the page, branching is required only at the beginning of the document where an object model-specific library is loaded: var isIE4 = ((navigator.appName.indexOf( Microsoft ) == 0 && parseInt(navigator.appVersion) == 4)) var isW3C = (document.documentElement) ? true : false if (isW3C) { // give priority to W3C model for IE5.x document.write(