This article explains how to create a link that will be displayed as a Uniform Resource Locator (URL) in a frame. (You can also use this procedure to display URLs in multiple frames.)
NOTES:
- The code in this article will function only in a Web browser that supports JavaScript.
- ImageMap hotspots will only refresh one frame as extended attributes are not available in the Image Hotspot Properties dialog box.
Method 1
To edit your hyperlink to update two frames, follow these steps:- In Page view, open the page on which you want to create the link.
- Select the text you want for the link and click the Link button on the
toolbar.
The Create Hyperlink dialog box will appear. - In the URL box, type the URL of the first page that you want to load.
- Click the Target Frame button and then click the frame for the first page.
- Click OK twice.
- To switch to HTML view, click the HTML tab.
- Insert the following onClick parameter in the anchor tag:
onClick="parent.frames[<n>].location.href='<URL>';"
where <n> is a number indicating the frame that you want the resource to appear in, and <URL> is the URL of the page that you want to appear in that frame.
NOTE: Frame numbers start at 0; hence, parent.frames[2] indicates the third frame in a collection.
For example this code<a href="mypage.htm" onclick="parent.frames[2].location.href='otherpage.htm';">My Link</a>
will load Otherpage.htm into the third frame in the collection. If you want to load additional frames, repeat step 6 for each frame you want to load (separate each new entry with a space). - On the File menu, click Save.
Method 2
- Point the hyperlink to a new frames page.
- Set the initial pages of the new frames page to be the desired pages you want the hyperlink to point to.