Email this Page Log Support Call Send Feedback Print

Previous Topic

Next Topic

Book Contents

Book Index

Calling HTML Pages Within the Frameset

If calling an HTML file from your application using the URL of the individual page (for example: path/directory/123.htm), instead of the frameset (path/directory/index.htm), the navigation pane (your Contents) doesn't display. And then, if the viewer selects the Contents or Index buttons, two new windows pop up...

This is a behavior of HTML and occurs when opening an individual HTML file outside of the frameset as the file uses an unnamed window - the frameset launches the page in "Body". While you can link to the individual HTML files, this only opens the page and not the entire frameset, so if you then click on the Contents or Index link, it opens multiple windows.

By default, the only way to ensure that all frames are displayed, is to open index.htm (the frameset) and navigate to the desired topic.

Of course it would be far more user-friendly if you could provide a link directly to a certain page, yet still have that page open within the frameset. The good news is that you can.

Author-it creates a basic HTML Frameset called index.htm. You can replace this with your own frameset which is able to receive a parameter that refers to the BODY page you are calling. You can do this by specifying your own frameset under the Book objects HTML tab (much like you do if using the full text search functionality). Simply develop your index page in HTML with Javascript, ASP, Coldfusion, MIVA, CGI, or any server based or client base scripting language able to receive a parameter in the URL and adjust the HTML code in the Frameset.

Our default Frameset is as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title></title>
<meta name="Generator" content="AuthorIT">
</head><frameset cols="29%,71%">
<frame name="TOC" SRC="toc.htm">
<frame name="BODY" SRC="xxx.htm">
</frameset>
</html>

All you need to do is replace the "xxx.htm" with the parameter received...
So for example, if you wanted to display the HTML page 123.htm, your URL might be index.asp?123. The script in your index.asp would then replace xxx.htm with 123.htm and display the page. (You don't need to use ASP - this is just an example).

OK- so what if I'm not an HTML or scripting guru?

Easy! We've provided a Javascript option, the supporting files, and some simple instructions that can be used to do this all for you... Read more to find out how.

Top of Page Email this Page Log Support Call Send Feedback Print