home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Using the Comment Component

The Comment Component enables you to add comments to your WYSIWYG page on the FrontPage Editor’s Normal tab. The comment will appear in purple text and will be preceded by the word “Comment.” Comments are remarks intended for authors and editors working on the document. They are not meant for consumption by the end user, so you’ll never see a comment on the Preview tab.

To insert a Comment Component on a page, follow these instructions:

1.  Choose Insert, FrontPage Component or click the Insert FrontPage Component button on the toolbar (the button has a picture of a robot on it). When you do, you’ll see the Insert FrontPage Component dialog box shown in Figure 10.5. The box presents a listing of the FrontPage Components so that all you need to do to place one is to select it and click OK.
2.  Select the Comment Component and click OK. The Comment dialog box shown in Figure 10.6 will appear.
3.  Type the text of your comment into this dialog box and click OK when you finish.


FIGURE 10.5  The Insert FrontPage Component dialog box is your one stop for accessing most of FrontPage’s Components.


FIGURE 10.6  The Comment dialog box collects the comments you want to place in your documents.

After you click OK, you’ll see your comment appear on the Normal tab of the FrontPage Editor. As previously noted, the comment should be painted purple and be preceded with the word “Comment.” If you switch over to the HTML tab, you’ll see something like the following:

<P><!--webbot bot=“PurpleText”
preview=“ This document created on 29 Sept 98 using Microsoft FrontPage.” --></P>

When interpreted by the server, this code will invoke the PurpleText bot on the server and render the content stored under the preview parameter as a comment.


NOTE:  A few things are worth noting about the preceding code. First, FrontPage still refers to components as WebBots in the code. This isn’t a big deal because the FrontPage Server Extensions can handle the two names, and neither you nor a user should detect any difficulties.

The second thing to note is that the component code is stored between HTML comment tags: <!-- and -->. This keeps the component code hidden in the event that the raw code is served to a browser. You’ll find that most of the FrontPage Components show up in the HTML code this way.


If you ever want to edit a comment, move your mouse pointer to it. When you do, you’ll see the pointer cursor change to include a robot character, which means you’re pointing at a FrontPage Component. Double-click the comment to open up the Comment dialog box you saw in Figure 10.6 and make the changes to your comment there.

Using the Insert HTML Component

HTML is changing all the time. New tags are proposed—and often implemented—at an alarming rate. No Web authoring program can keep releasing new versions to keep up with all the new tags, so most of them come with some means of inserting an unsupported HTML tag into a document’s HTML code. In the case of the FrontPage Editor, this task is handled by the Insert HTML Component.

To insert an unsupported HTML tag, follow these steps:

1.  Choose Insert, FrontPage Component, or click the Insert FrontPage Component toolbar button to call up a listing of available components.
2.  Select the Insert HTML Component to reveal the HTML Markup dialog box (see Figure 10.7).
3.  Type in the code you want to insert and then click OK. You won’t see anything happen on the Normal tab, but you’ll see something like the following on the HTML tab:
<P><!--webbot bot=“HTMLMarkup” startspan -->
<OPTGROUP>
   <OPTION VALUE=“1”>Premium Plan
   <OPTION VALUE=“2”>Gold Plan
   <OPTION VALUE=“3”>Silver Plan
</OPTGROUP>
<!--webbot bot=“HTMLMarkup” endspan --></P>

Again, the new code is not placed directly into the existing code. Rather it is passed as a parameter to the HTMLMarkup bot that will insert the tag into the file when the file is served.


FIGURE 10.7  You can enter new HTML tags using the Insert HTML Component.


CAUTION:  

FrontPage can’t validate an HTML tag it doesn’t know about. When you enter a new tag, you need to use the correct syntax.


Using the Timestamp Component

Marking your pages with the date and time of the last change or update shows visitors how “fresh” your content is. Unfortunately, it’s easy to forget to adjust the date every time you make an edit to a page. The FrontPage Timestamp Component automates this process and places the date and time of the most current revision on the page whenever it is served.

To place a timestamp on your page

1.  Move the cursor to the position on the page where you want the timestamp to appear.
2.  Choose Insert, Timestamp to reveal the Timestamp Properties dialog box you see in Figure 10.8. Here you have the option of showing the date of the last edit or the last automatic update (other FrontPage Components enable you to automate content updates). You can choose from nearly 20 date formats and 8 time formats.
3.  After you configure the timestamp to your liking, click OK to place it on your page.

You’ll see the date and time appear on the FrontPage Editor’s Normal tab. On the HTML tab, you’ll see something like the following:

<!--webbot bot=“Timestamp” s-type=“EDITED”
s-format=“%d %B %Y %I:%M %p” -->

This code prompts the server to activate the Timestamp bot and passes parameters to it corresponding to how you configured the timestamp.


FIGURE 10.8  Automating the Last Updated date relieves you of an often-forgotten task.


NOTE:  The Timestamp Component is not available from the dialog box you saw in Figure 10.5. You can only select it from the Insert menu.

Using the Include Page Component

The Include Page Component builds the HTML from another file into the HTML file being served. This is a convenient way to place standard, recurring page elements, such as copyright notices or disclaimer text. It also has the advantage of enabling you to store this content in one place. If you need to update the content, you only have to do so once in the master file rather than once for each HTML file on your site.

Using the Include Page Component is easy. Follow these steps:

1.  Choose Insert, FrontPage Component, or click the Insert FrontPage Component toolbar button to call up the list of available components.
2.  Choose the Include Page Component and click OK. This calls up the simple dialog box you see in Figure 10.9.
3.  All you need to specify is the URL of the page you want to include. If the page is in the current Web, you can use the Browse button to find it. Otherwise, you have to type the URL into the Page URL field.


FIGURE 10.9  Includes are great for placing standard content on your pages.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.