Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

HOW TO: Link to Two Target Frames Using a Single Hyperlink in FrontPage 2000


View products that this article applies to.

Summary

If your web includes a frame set page, you can set a link to specify the frame in which you would like a page to be displayed.

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.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Method 1

To edit your hyperlink to update two frames, follow these steps:
  1. In Page view, open the page on which you want to create the link.
  2. Select the text you want for the link and click the Link button on the toolbar.

    The Create Hyperlink dialog box will appear.
  3. In the URL box, type the URL of the first page that you want to load.
  4. Click the Target Frame button and then click the frame for the first page.
  5. Click OK twice.
  6. To switch to HTML view, click the HTML tab.
  7. 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).
  8. On the File menu, click Save.

Method 2

  1. Point the hyperlink to a new frames page.
  2. Set the initial pages of the new frames page to be the desired pages you want the hyperlink to point to.



↑ Back to the top


References

For a Microsoft FrontPage 98 version of this article, see 194099.
For a Microsoft FrontPage 97 and earlier version of this article, see 158814.










↑ Back to the top


Keywords: KB196137, kbhowtomaster, kbhowto

↑ Back to the top

Article Info
Article ID : 196137
Revision : 2
Created on : 6/18/2005
Published on : 6/18/2005
Exists online : False
Views : 450