iFrames - VLab Showcase
Content: iFrames
To the right is an iframe portlet, which targets a page in the weather.gov domain. Note that the intent is not for the user to use this iframe to interact with the target - if that is the goal, then a link should be used so the user can see the target web page fully - but instead to display a referential resource that is pertinent to the VLab community yet managed by that target and may be changed by that target. If the target's content changes, the iframe will not need to be changed in order to accommodate the change in content (as long as the web address stays the same).
Note: For most portlets we want to avoid using portlet borders (as it makes the web pages look too blocky and compartmentalized), but in this case, a border helps remind the user that what they are seeing is an entirely separate web page. (This border was produced by using CSS.)
IFrame
What are iFrames?
An "iframe" is an "inline frame" html method that allows for one html document to be embedded inside another html document. This can accomplish many things, but for the purposes of this showcase, we are highlighting how to embed an entirely separate web page inside a VLab Community web page.
What is it good for?
Often, if one web page wants to associate with another, a link can be used, which requires the user to click it to go to that other web page. An iframe is good for when the hosting web page wants the user to see (and potentially interact with) that other web page without having to click a link. Sometimes the decision regarding which to use is made just based on the preference of the web designer, but there are situations where an iframe is better than a link, like:
- The target web page presents materials that are expected to be accessed often (such as the VLab Development Services Wiki).
- The target web page presents pertinent, concise, referential information (ie: no scrolling required).
- Hosting a Google Doc where collaboration is expected by the community membership.