• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Dynamic Techniques: Advanced > Dynamic Content Between Frames

Dynamic Content Between Frames

You can use JavaScript to control objects in one frame without much trouble (Figure 14.7). The challenge comes in the way you construct your cross-browser DOM, which now needs to find a path to an element in another frame. In effect, this is like adding the country code to your address (see "Understanding the DOM" in Chapter 11). You need to set up a different version of the findDOM code, called findDOMFrame.js, rather than addressing an object in the same document, the function has to find an object in a document in a different frame. This means that rather than just passing the function the name of the object you want to change, you also have to pass the function the name of the frame the object is in.

Figure 14.7. The rabbit may be in a different frame, but the DOM hunts him down and makes him run.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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