The information in this article applies to:
- Microsoft FrontPage 98 for Windows
- Microsoft FrontPage 97 for Windows with Bonus Pack
- Microsoft FrontPage for Windows, version 1.1
SUMMARY
If your FrontPage 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.
MORE INFORMATION
Microsoft Technical Support will not resolve problems produced by editing
the HTML that FrontPage generates. This HTML Code sample is provided as a
convenience for authors seeking to extend the capabilities of FrontPage.
For more information about writing HTML, please see the following Microsoft
Web site:
http://www.microsoft.com/workshop/author/newhtml/default.htm
WARNING: ANY USE BY YOU OF THE HTML PROVIDED IN THIS ARTICLE IS AT YOUR OWN
RISK. Microsoft provides this HTML "as is" without warranty of any kind,
either express or implied, including but not limited to the implied
warranties of merchantability and/or fitness for a particular purpose.
To edit your hyperlink to update two frames, use one of the following
methods.
Method 1: FrontPage 98
- In FrontPage Editor, 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 Target Frame, click the frame for the first page, and
click OK twice.
- Click the HTML tab to switch to HTML view.
- 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: FrontPage 97 and FrontPage 1.1
- In FrontPage Editor, open the page on which you want to create the link.
- Select the text you want for the link and click the Link button.
The Create Hyperlink dialog box (the Create Link dialog box in
FrontPage 1.1) will appear.
- Click the Current Web tab or the World Wide Web tab. In the Page
box, type the URL of the first page that you want to load.
- In the Target Frame box, type the name of the frame set you would
like the first URL to appear in.
- Click the Extended button, and then click Add.
- In the Name box, type onClick.
- In the Value box, type the following code
parent.frames[<n>].location.href='<URL>';
where <n> is a number indicating the frame in which you want the
resource to appear, 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
parent.frames[2].location.href='otherpage.htm';
will load Otherpage.htm into the third frame in the collection. If
you want to load additional frames, repeat step 7 for each frame
you want to load (separate each new entry with a space).
- Click OK three times to accept these changes and return to your
page.
|