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.

FP: How to Insert Script Code in a Shared Border of a Web


View products that this article applies to.

This article was previously published under Q295606

↑ Back to the top


Summary

This article describes how to insert script code into a shared border of a Web.

↑ Back to the top


More information

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. NOTE: You may receive an error message if you copy the examples directly from this article and paste them into FrontPage. The angle brackets (< and >) may appear as escaped HTML code (< and >). To work around this behavior, paste the script into a blank Notepad document, and then copy it from Notepad before you paste it into FrontPage.

To add script code to a shared border, follow these steps:
  1. Start FrontPage and open the Web site. To do this, click Open Web on the File menu, select the Web you want to open, and click Open.
  2. On the Tools menu, click Web Settings.
  3. Click the Advanced Settings tab. Click to select the Show hidden files and folders check box and click Apply.

    NOTE: Shared borders are kept in a hidden folder named _borders.
  4. If you receive the following message
    The changes you made in the Advanced Settings tab will take effect after the Web is refreshed from the server.

    Do you want to refresh the Web now?
    click Yes.
  5. Click OK to close the Web Settings dialog box.
  6. Double-click the _borders folder.

    NOTE: You should see one or more of the following shared border pages:

    • Top.htm (Top Shared Border)
    • Left.htm (Left Shared Border)
    • Right.htm (Right Shared Border)
    • Bottom.htm (Bottom Shared Border)

    When you edit these files the information that appears in the borders is updated.
  7. Right-click the file you want to modify and click Open on the menu that appears. For example, open the Top.htm page.
  8. When the page opens in FrontPage, switch to HTML view.
  9. Locate the opening <BODY> tag in the HTML code and click just after the tag. Press ENTER twice to create new lines.

    WARNING: Information you type between the <BODY> and </BODY> tags in a shared border file appears in the border. Any code that you type in the <HEAD></HEAD> section is ignored. Therefore, to have the script be processed, place it in the document body section.
  10. On the new line, type the script code you want. For example, type the following script code:
    <script language="JavaScript">
    <!--
        alert('This is in the TOP border.');
    -->
    </script>
    					
  11. On the File menu, click Save to save the changes you made to the page.
  12. On the File menu, click Close.
When you view your Web site in a Web browser, a message box similar to the following appears for each page that has the shared border:
This is in the TOP border.

↑ Back to the top


References

For additional information about using FrontPage and shared borders, click the article number below to view the article in the Microsoft Knowledge Base:
290767� FP2000: How to View Shared Borders Pages in a FrontPage Web

↑ Back to the top


Keywords: KB295606, kbhowto

↑ Back to the top

Article Info
Article ID : 295606
Revision : 5
Created on : 1/31/2007
Published on : 1/31/2007
Exists online : False
Views : 318