Frames Review
Creating frames
A basic frameset can be created in HTML using the following syntax:
<frameset (rows/cols)="25(%), *"> <frame src="(frame1_source.htm)" name="(frameName)" (noresize) scrolling="(yes/no/auto)"> <frame src="(frame2_source.htm)" name="(frameName)" marginwidth=(widthValue) marginheight=(heightValue)> </frameset> <noframes> (No frame text) </noframes>
The frameset tag is responsible for sizing the frames on the document. Each frame is then filled with the HTML document named in the src attribute.
Properties of the Window object
The topmost object in JavaScript, the Window object, contains properties that facilitate interframe communication. Those properties are:
The frames property -- an array containing references to each frame in the window;
The parent property -- a reference in a frame to the document containing the frameset tag;
The top property -- a reference to the topmost document, primarily used with nested frames;
The self property -- a reference to the current document.
The JavaScript protocol
Often it is convenient to make a hypertext link to a JavaScript function. This can be accomplished using the following syntax:
<a href="JavaScript: (JavaScript method() )>Click here</a>