TOC PREV NEXT INDEX

Put your logo here!


FRAMESET

The FRAMESET element is a structure for containing subframes in HTML. It manages FRAME elements but not IFRAMES, which are inserted "in-line" into the document. In HTML, a frameset takes the following basic structure:

<frameset> 
  <frame src="some_doc.html" /> 
  <frame src="other_doc.html" /> 
</frameset> 

The DOM frameset object provides minimal programmatic access to the FRAMESET HTML element. Its interface-the two optional properties cols and rows-are a way to indicate the dimenions of the frame set, how many subframes it manages. Note that the frameset object does not provide interfaces for getting to the subframes it manages.

To get the frames in a document, you must ask the document itself, using the document.getElementById() method and the id of the frame(s) you want, or the document.getElementsByTagName("FRAME"), which returns a NamedNodeList array:

f1 = document.getElementById("frame1"); 
alert(f1.src); // print the src of the first frame 
 
frames = document.getElementsByTagName("FRAME"); 
for (var i = 0; i < frames.length; i++) { 
  // do something with each frame as frame[i] 
 
} 
 

Properties

This property sets or returns the number of columns of frames in the frameset.
This property sets or returns the number of rows of frames in the frameset.


mozilla.org | mailto:oeschger | bug 93108
TOC PREV NEXT INDEX