Displaying a Web Page Inside Another Web Page
Using a Server Side Include
Use a server side include (SSI) in your web page file to have another file inserted automatically into your page.
- Place the SSI in the HTML code where you would like the date to appear on the page. Use a plain text editor such as Pico (using SSH) or the code view of your HTML editor to type or paste in the SSI.
- You can copy and paste the SSIs from this page to your file.
- You must set the execute permission (in Unix) on your file on comp.uark.edu or cavern.uark.edu for the SSI to work.
- Some HTML editors such as Netscape Composer will, upon editing and uploading your file, remove all SSIs from the file and replace them with the static text result of the SSI.
Use the following SSI (replace "filename" with the actual name of the file to be included; if the file is not in the same directory, be sure to include the path):
<!--#include file="filename"-->
Using Iframes
Inline frames (iframes) are useful if you have a script that produces a page that you would like to be a part of another page or you would like to pull a forum or something similar onto a page. An iframe can go anywhere on the page. The following HTML will create an inline frame:
<IFRAME SRC="otherpage.html" TITLE="My other page" NAME="otherpage" FRAMEBORDER="0" WIDTH="50%" HEIGHT="100">Alternate content for non-supporting browsers, probably a link to the same info</IFRAME>
- The SRC attribute (required) has the value of the filename or URL (it can be a relative link or absolute)of the page you are wanting to pull in.
- The TITLE attribute should describe the frame content and is required for ADA compliancy.
- The content between the IFRAME tags will be displayed only if the browser does not support iframes. This content should provide an alternative so that the iframe content can be viewed in another way. This content is required for ADA accessibility.
- The FRAMEBORDER attribute uses a value of 0 for no border and a value of 1 (default value) to show a border.
- The WIDTH and HEIGHT attributes determine the size of the iframe; use percentages instead of pixel sizes for better ADA compliancy.
- The iframe can be aligned using the ALIGN attribute with either the TOP, MIDDLE, BOTTOM, LEFT, or RIGHT value.
- The MARGINWIDTH and MARGINHEIGHT attributes can be used to adjust the iframe margins.
- The SCROLLING attribute has the value of YES, NO, or AUTO (default). YES will put a scrollbar on the iframe whether it is needed or not, and NO will not put a scrollbar on the iframe even if it is needed. Not allowing a scrollbar could cause part of your iframe content to not be available if it all does not fit in the area allowed. AUTO will determine whether or not a scrollbar is needed.
- Use the LONGDESC attribute if the iframe requires a long description (in addition to the TITLE information) for ADA compliancy.
- The NAME attribute should be used if the iframe will be used as a target for a link.
|