CD-103Chapter 11 .Scripting Frames and Multiple Windows A reference from the other sibling back to the first looks the same, but the frames[] array index or frameName part of the reference differs. Of course, much more complex frame hierarchies exist in HTML. Even so, the document object model and referencing scheme provide a solution for the most deeply nested and gnarled frame arrangement you can think of following the same precepts you just learned. Frame Scripting Tips One of the first mistakes that frame scripting newcomers make is writing immedi ate script statements that call upon other frames while the pages load. The prob lem here is that you cannot rely on the document loading sequence to follow the frameset source code order. All you know for sure is that the parent document begins loading first. Regardless of the order of tags, child frames can begin loading at any time. Moreover, a frame s loading time depends on other elements in the document, such as images or Java applets. Fortunately, you can use a certain technique to initiate a script once all of the documents in the frameset are completely loaded. Just as the onLoadevent handler for a document fires when that document is fully loaded, a parent s onLoad event handler fires after the onLoadevent handler in its child frames is fired. Therefore, you can specify an onLoadevent handler in the