Cheap web hosting - 366Part IIIDocument Objects ReferenceBut when the object model

366Part IIIDocument Objects ReferenceBut when the object model also exposes HTML elements, the notion of the frameelementobject is somewhat distinct from the frame object of the original model. The frameelementobject represents an object whose properties are dominated by the attributes you set insidethe tag. This provides access to settings, such as the frame border andscrollability the kinds of properties that are not exposed to the original frame object. References to the frame and frameelement objects are also different. You ve seen plenty ofexamples of how to reference an old-fashioned frame earlier in this chapter. But access to aframeelement object is either via the element s idattribute or through the child node rela- tionship of the enclosing framesetelement (you cannot use the parentNodeproperty toback your way out of the current document to the frameelement that encloses the docu- ment). The way I prefer is to assign an idattribute to tags and access the frameele- ment object by way of the documentobject that lives in the parent (or top) of the framesethierarchy. Therefore, to access the frameBorderproperty of a frameelement object from ascript living in any frame of a frameset, the syntax isparent.document.all.frame1ID.frameBorderor, for IE5+/NN6+/W3Cparent.document.getElementById( frame1ID ).frameBorderWhen the reference goes through the frameelement object you can still reach the documentobject in that frame via the element object s contentWindowor contentDocumentproperties(see the frameelement object later in this chapter). window ObjectPropertiesMethodsEvent HandlersappCorealert()onabort clientInformationattachEvent() onafterprintclipboardDataback()onbeforeprintclosedblur() onbeforeunloadcomponents[]captureEvents()onblur controllers[]clearInterval()onchange cryptoclearTimeout()onclick defaultStatusclose()onclose dialogArgumentsconfirm()ondragdropdialogHeightcreatePopup()onerrordialogLeftdetachEvent() onfocus dialogTopexecScript()onhelpdialogWidthfind()onkeydown directoriesfireEvent() onkeypress documentfocus() onkeyup eventforward()onloadexternalhandleEvent()onmousedown frameElementhome()onmousemove window

Leave a Reply