381Chapter 16Window and Frame ObjectsListing 16-7:Framesetting Document for (Web site translator)

381Chapter 16Window and Frame ObjectsListing 16-7:Framesetting Document for Listing 16-8 A call to determine the number (length) of frames returns 0 from the point of view of the cur- rent frame referenced. That s because each frame here is a window that has no nested frameswithin it. But add the parentproperty to the reference, and the scope zooms out to take intoaccount all frames generated by the parent window s document. Listing 16-8:Showing Various Window Properties The last statement in the example shows how to use the array syntax (brackets) to refer to aspecific frame. All array indexes start with 0 for the first entry. Because the document asksfor the name of the first frame (parent.frames[0]), the response is JustAKid1for bothframes. Related Items:frame, framesetobjects; window.parent, window.topproperties. windowObject.frames

Leave a Reply