apex:iframe
A component that creates an inline frame within a Visualforce
page. With a frame, you can keep some information visible while other
information is scrolled or replaced.
This component supports HTML pass-through attributes using the html prefix. Pass-through attributes are attached to the generated <iframe> tag.
Example
<apex:iframe src="https://amazon.com" scrolling="true" id="theIframe"/>
The previous example renders the following HTML:
<iframe height="600px" id="theIframe" name="theIframe" src="https://amazon.com" width="100%"></iframe>
Attributes
Attribute Name | Attribute Type | Description | Required? | API Version | Access |
---|---|---|---|---|---|
frameborder | Boolean | A Boolean value that specifies whether a border surrounds the inline frame. If not specified, this value defaults to false. | 10.0 | global | |
height | String | The height of the inline frame expressed either as a percentage of the total available vertical space (for example, height="50%") or as the number of pixels (for example, height="300px"). If not specified, this value defaults to 600 px. | 10.0 | global | |
id | String | An identifier that allows other components in the page to reference the inline frame component. | 10.0 | global | |
rendered | Boolean | A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. | 10.0 | global | |
scrolling | Boolean | A Boolean value that specifies whether the inline frame can be scrolled. If not specified, this value defaults to true. | 10.0 | global | |
src | String | The URL that specifies the initial contents
of the inline frame. This URL can either be an
external website or another page in the
application. For example, to render the static
resource MyAsset on a
separate domain from Visualforce:
|
10.0 | global | |
title | String | The text to display as a tooltip when the user’s pointer hovers over this component. | 10.0 | global | |
width | String | The width of the inline frame expressed either as a percentage of the total available horizontal space (for example, width="80%") or as the number of pixels (for example, width="600px"). | 10.0 | global |