• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Q&A

Q1:What happens when my Web page includes multiple HTML documents, such as when frames are used?
A1: In this case, each window or frame has its own document object that stores the elements of the HTML document it contains.
Q2:I created a page that uses browser detection to use DOM features on 5.0 or 6.0 browsers only, but it does not work in Internet Explorer 5.0. What could cause this?
A2: Remember, Internet Explorer 5.0's version number is listed as “4.0”, for reasons only Microsoft understands. See Hour 16 for a consistent way of detecting 5.0 and 6.0 browsers.
Q3:If the new DOM allows any object to be dynamically changed, why does the animation example need to use the <div> tags around the image?
A3: Actually, you can animate the <img> tag directly rather than using the <div> tag. In the example, I used <div> to make it easier to support older browsers (see the Exercises section).
Q4:The new DOM makes cross-browser scripting easy, but what's to stop version 7.0 of Netscape or Internet Explorer from changing everything again and breaking my scripts?
A4: There's no guarantee that things won't change, of course—but the W3C DOM is designed to accommodate future versions of HTML and XML, and both Netscape and Microsoft have committed to supporting it. With any luck, cross-browser scripting will continue to get easier.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint