XUL:iframe
From MDC
« XUL Reference home [ Examples | Attributes | Properties | Methods | Related ]
An inner frame that works much like the HTML iframe element. The src attribute can be used to specify the content of the frame. This content is a separate document. The children of the iframe are ignored.
More information is available in the XUL tutorial.
- Properties
- accessibleType, contentDocument, contentWindow, docShell, webNavigation
[edit] Examples
<iframe src="table.php" flex="2" id="browserTable" name="table_frame"/>
Selecting an URL from a menu
<menulist oncommand="doNav(this);">
<menupopup>
<menuitem label="Mozilla" value="http://mozilla.org" />
<menuitem label="Slashdot" value="http://slashdot.org"/>
<menuitem label="Sourceforge" value="http://sf.net" />
<menuitem label="Freshmeat" value="http://freshmeat.net"/>
</menupopup>
</menulist>
<iframe id="myFrame" flex="1"/>
<script>
function doNav(obj){
var url = obj.selectedItem.value;
// note the firstChild is the menupopup element
document.getElementById('myFrame').setAttribute('src', url);
}
</script>
[edit] Attributes
- showcaret
- Type: boolean
- Whether or not to cause a typing caret to be visible in the content area. Default is
false.
- src
- Type: URL
- The URL of the content to appear in the element.
|
Inherited from XUL element |
[edit] Properties
|
Inherited from XUL element Inherited from DOM element |
- accessibleType
- Type: integer
- A value indicating the type of accessibility object for the element.
- contentDocument
- Type: document
- This read-only property contains the document object in the element.
- contentWindow
- Type: window
- This read-only property contains the window object in the element.
- docShell
- Type: nsIDocShell
- This read-only property contains the nsIDocShell object for the document.
- webNavigation
- Type: nsIWebNavigation
- This read-only property contains the nsIWebNavigation object for the document. Most of its methods are callable directly on the element itself, such as goBack and goForward. It also contains the load constants used by reloadWithFlags and loadURIWithFlags.
[edit] Methods
|
Inherited from XUL element Inherited from DOM element |
[edit] Related
- Interfaces
- nsIAccessibleProvider