Introduction

An example link to specify which document should load in an iframe could be set up as follows:

<a href="your_page.html?ifrm=pg1">[link text here]</a>

The example links above this iframe are set up as you would to direct a user here from other locations. In-page links to load iframes would generally use a simpler method. The example in the download file demonstrates.

The src attribute of the iframe tag provides a default document for non-JavaScript enabled browsers:

<iframe name="ifrm" id="ifrm" src="page.html"></iframe>

The object literal used by the code for setting up query parameters should also specify a default page. The JavaScript page provides more information.