125Chapter 11Scripting Frames and Multiple WindowsFrame Scripting TipsOne of the first mistakes that frame scripting newcomers make is writing immediate scriptstatements that call upon other frames while the pages load. The problem here is that youcannot rely on the document loading sequence to follow the frameset source code order. Allyou know for sure is that the parent document beginsloading first. Regardless of the order oftags, child frames can begin loading at any time. Moreover, a frame s loading timedepends 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 inthe frameset are completely loaded. Just as the onloadevent handler for a document fireswhen that document is fully loaded, a parent s onloadevent handler fires after the onloadevent handler in its child frames is fired. Therefore, you can specify an onloadevent handlerin the