mozilla

Revision 83423 of iframe

  • Revision slug: XUL/iframe
  • Revision title: iframe
  • Revision id: 83423
  • Created:
  • Creator: spirit23
  • Is current revision? No
  • Comment sorry i was wrong, so mindless; 2 words added, 6 words removed

Revision Content

{{ XULRefElem() }}

An inner frame that works much like the HTML iframe element. The {{ XULAttr("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.

Attributes
{{ PrefAnch("a-", "showcaret") }}, {{ PrefAnch("a-", "src") }}, {{ PrefAnch("a-", "browser.type", "type") }}, {{ PrefAnch("a-", "transparent") }}
Properties
{{ PrefAnch("p-", "accessibleType") }}, {{ PrefAnch("p-", "contentDocument") }}, {{ PrefAnch("p-", "contentWindow") }}, {{ PrefAnch("p-", "docShell") }}, {{ PrefAnch("p-", "webNavigation") }}

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>

Attributes

{{ XULAttrInc("showcaret") }} {{ XULAttrInc("src") }} {{ XULAttrInc("browser.type") }} {{ XULAttrInc("transparent") }} {{ XULAttrInheritedWide() }}

Properties

{{ XULPropInherited() }} {{ XULPropInc("accessibleType") }} {{ XULPropInc("contentDocument") }} {{ XULPropInc("contentWindow") }} {{ XULPropInc("docShell") }} {{ XULPropInc("webNavigation") }}

Methods

{{ XULMethInheritedWide() }}

Related

Interfaces
nsIAccessibleProvider

{{ languages( { "de": "de/XUL/iframe", "ja": "ja/XUL/iframe", "pl": "pl/XUL/iframe" } ) }}

Revision Source

<div class="noinclude">{{ XULRefElem() }}</div>
<p>An inner frame that works much like the HTML <code>iframe</code> element. The {{ XULAttr("src") }} attribute can be used to specify the content of the frame. This content is a separate document. The children of the <code>iframe</code> are ignored.</p>
<p>More information is available in the <a href="/en/XUL_Tutorial/Content_Panels" title="en/XUL_Tutorial/Content_Panels">XUL tutorial</a>.</p>
<dl> <dt>Attributes</dt> <dd>{{ PrefAnch("a-", "showcaret") }}, {{ PrefAnch("a-", "src") }}, {{ PrefAnch("a-", "browser.type", "type") }}, {{ PrefAnch("a-", "transparent") }}</dd> <dt>Properties</dt> <dd>{{ PrefAnch("p-", "accessibleType") }}, {{ PrefAnch("p-", "contentDocument") }}, {{ PrefAnch("p-", "contentWindow") }}, {{ PrefAnch("p-", "docShell") }}, {{ PrefAnch("p-", "webNavigation") }}</dd>
</dl>
<h3 name="Examples">Examples</h3>
<pre>&lt;iframe src="table.php" flex="2" id="browserTable" name="table_frame"/&gt;
</pre>
<p>Selecting an URL from a menu</p>
<pre>&lt;menulist oncommand="doNav(this);"&gt;
  &lt;menupopup&gt;
    &lt;menuitem label="Mozilla" value="http://mozilla.org" /&gt;
    &lt;menuitem label="Slashdot" value="http://slashdot.org"/&gt;
    &lt;menuitem label="Sourceforge" value="http://sf.net" /&gt;
    &lt;menuitem label="Freshmeat" value="http://freshmeat.net"/&gt;
  &lt;/menupopup&gt;
&lt;/menulist&gt;


&lt;iframe id="myFrame" flex="1"/&gt;

&lt;script&gt;
function doNav(obj){
  var url = obj.selectedItem.value;
  // note the firstChild is the menupopup element
  document.getElementById('myFrame').setAttribute('src', url);
}
&lt;/script&gt;
</pre>
<h3 name="Attributes">Attributes</h3>
<p>{{ XULAttrInc("showcaret") }} {{ XULAttrInc("src") }} {{ XULAttrInc("browser.type") }} {{ XULAttrInc("transparent") }} {{ XULAttrInheritedWide() }}</p>
<h3 name="Properties">Properties</h3>
<p>{{ XULPropInherited() }} {{ XULPropInc("accessibleType") }} {{ XULPropInc("contentDocument") }} {{ XULPropInc("contentWindow") }} {{ XULPropInc("docShell") }} {{ XULPropInc("webNavigation") }}</p>
<h3 name="Methods">Methods</h3>
<p>{{ XULMethInheritedWide() }}</p>
<h3 name="Related">Related</h3>
<dl> <dt>Interfaces</dt> <dd><a href="/en/XPCOM_Interface_Reference/nsIAccessibleProvider" title="en/nsIAccessibleProvider">nsIAccessibleProvider</a></dd>
</dl>
<p>{{ languages( { "de": "de/XUL/iframe", "ja": "ja/XUL/iframe", "pl": "pl/XUL/iframe" } ) }}</p>
Revert to this revision