Now that you've learned the rest of the story, you're going to create and configure some forms for your site. You'll take the tasks you've learned in this section and work them in with the pages you've already created! Forms add a lot of interactivity and interest to a site-besides, they're fun to design!
The forms you create in this chapter will utilize the FrontPage bots, which means that in order to test them you'll need to have the FrontPage Personal Web Server, Microsoft Personal Web Server, or Internet Information Server running with the FrontPage Server Extensions installed. The first form you complete will be the Guest Book. You already have a page called guests.htm (Guests of My World) in your web that you can use.
To complete your guest book, follow these steps:
Now you'll create a form that you will paste into your guest book page. To use the Form Page Wizard, you have to create a new page, so follow these steps to create your guest book form:
You need to edit the fields' properties to assign shorter names that are more applicable to the form. These values are those that will be passed to the form handler for use in the confirmation form and the results file. Currently, these names are preceded by the word Contact, which you want to eliminate.
Some other small modifications have to be made, too. For example, all the form fields are 256 characters long, except for the URL form field, which contains only 25 characters. This might not be long enough for your guest to add his or her URL. Also, you need to increase the width of the scrolling text box a little to give the form a more balanced look.
To edit the form and the form fields, follow these steps:
Now you have to assign a form handler to your form. To do this, follow these steps:
When you configured the Save Results WebBot for the Guests of My World page, you assigned a form results page of guestlog.htm. This page is created automatically the first time a user submits his or her comments to your site. You'll include the guestlog.htm page on a new page, which is titled "My World Guest Book Log."
Follow these steps to create the page:
You want to thank your site visitors for submitting their comments to your guest book and also let them know they can view their comments if they go to the My World Guest Book Log and refresh the page in their browser. Create a simple confirmation page as follows:
TIP |
You can use the Insert | Web Bot Component command to place the first Confirmation Field bot in the table. Then copy it into your clipboard, paste a copy into each of the remaining cells, and double-click the bots in the second through fourth rows to edit their names. |
Open your Guests of My World page in the FrontPage Editor, if it is not still open. Then, with the Personal Web Server, Microsoft Personal Web Server, or Internet Information Server running, choose File | Preview in Browser. Select a browser and resolution, and click Preview.
Add a sample entry into the form fields, as shown in Figure 25.6. Then click the Submit Form button. You should see the Guest Book Confirmation Page, shown in Figure 25.7. Click the link to the Guest Book Log page, and you should see your entry in the My World Guest Book Log page, shown in Figure 25.8.
Figure 25.6 : Your visitors first navigate to the My World Guest Book page and enter their comments.
Figure 25.7 : After comments are entered, the user receives a confirmation page.
I decided to use what was already available to create a search page, so I combined the contents of the search page that I created in Chapter 18, "Real-Life Examples III: Adding Navigation and Automation," with the contents of FrontPage's Search Page template. Here's how you can do that:
You've created enough pages of your own now to get the idea of how to go about it, so now you'll use the Discussion Wizard to add a discussion group to your Web site, because it's the simplest way to do this. After that, I'll show you what the settings are for each page in the discussion.
Follow these steps to add the discussion group to your site:
NOTE |
It might take some time for FrontPage to add these new pages to your current Web site. It might seem as though your computer is hanging, but be patient. Eventually the Web will refresh, and the new pages will appear in your Web site. Use the Tools | Web Settings command in the FrontPage Explorer, and select the Advanced tab to configure your Web site to Show documents in hidden directories. This allows you to see all the new pages. |
The Discussion Wizard adds 14 new pages to your Web site; the settings on each page are described in the following sections when appropriate.
The My World Discussion Web Colors page, shown in Figure 25.11, currently uses default color settings. You want to assign your main web style sheet to this page, so that your discussion pages use the same color scheme. Open this page from your current web. Choose File | Page Properties. From the Background tab in the Page Properties dialog box, choose "Get Background and Colors from Page," and use the Browse button to assign the Main Style Sheet page (_private/style.htm) to the page. Save the revised page to your current web, using the File | Save command.
Figure 25.11 : Assign your main web style sheet to the Web Colors page for the discussion.
The Included Article Header for My World Discussion, shown in Figure 25.12, needs some revision. By default, the frameset is removed by the _top Target Frame when a user clicks on the Home, Contents, Search, Post, and Reply links in the page. This loads the Home page, the Discussion Contents page, the Search Page, and the Discussion Submission form in a full browser window when the user clicks one of the links. You can revise the article header to place the discussion pages in the main frame of your web's main frameset as well.
Figure 25.12 : Assign a target frame of main to the first five links on this page.
If you want to revise the target frame for each of the links, click anywhere within the Home, Contents, Search, Post, or Reply link on the page and choose the Create or Edit Hyperlink button on the Standard toolbar. The Edit Hyperlink dialog box opens to the Current FrontPage Web tab. Enter main in the Target Frame field and choose OK to return to the FrontPage Editor.
You'll also want to select all the text on the page, using the Edit | Select All command (Ctrl+A), and change the font to Arial, using the Change Font button on the Format toolbar. Reduce the size of the font by clicking the Decrease Font Size button once.
The Included Header for the My World Discussion is shown in Figure 25.13. For this header, insert discuss.jpg from your web's images directory into the first line on the page. Choose Edit | Select All (Ctrl+A) and select Arial font from the Change Font button on the Format toolbar. Reduce the size of the font by clicking the Decrease Font Size button once.
This header appears on all the main pages in the discussion. Like the previous page, you'll need to revise the Target Frame settings so that the pages in the discussion will load within the main frame in your web's main frameset. This applies to all four links-Home, Contents, Search, and Post. If you want to revise the target frame for each of the links, click anywhere within the links' text, and choose the Create or Edit Hyperlink button on the Standard toolbar. The Edit Hyperlink dialog box opens to the Current FrontPage Web tab. Enter main in the Target Frame field, and choose OK to return to the FrontPage Editor.
The Included Footer for My World Discussion (shown in Figure 25.14) contains a Timestamp bot that places the date that the page was last automatically updated on the page. By default, the timestamp uses a date format and does not include the time. To change the date and time styles, double-click the timestamp and choose a new date and time configuration. Click OK to return to the FrontPage Editor.
Figure 25.14 : Change the timestamp on the footers for the discussion if desired.
The Included Article Footer for My World Discussion is identical to that shown in Figure 25.14.
The Discussion page is shown in Figure 25.15 and is the table of contents for the articles in your discussion. You'll want to change the title from Contents for _myworld Discussion to Contents for My World Discussion. You'll probably also want to change the font style to Arial and reduce the size by clicking the Decrease Indent button once.
I want to point out something about this page. At first, it appears as though there are no contents in it. However, that is only a temporary situation. Beneath the heading is an Include bot. As a user submits articles or replies to your discussion, his or her titles are added to the _myworld/tocproto.htm page. That page, in turn, is included in this page through the use of an Include bot. Eventually, you will see a list of articles on this page. The list of articles is compiled each time a user submits an article to your discussion group.
This page doesn't contain anything that you should edit. When you open the page, you'll see text that reads Form Results Inserted Here. This is a Form Insert Here WebBot Component, which is used with the Save Results bot when you specify a results file. It acts as a placeholder for the next group of data submitted by a form. The Form Insert Here WebBot Component is not configurable.
The frameset for the discussion contains two rows and one column. The upper frame is named contents, and it initially loads the My World Discussion TOC (Framed) page. In this frame, a table of contents lists all articles in the discussion group. The lower frame in the frameset initially loads the My World Discussion Welcome page into it, but when a user clicks on an article from the contents frame, the article appears beneath it in this lower frame.
If the user is not viewing your web in a frame-compatible browser, the My World Discussion TOC page is displayed in lieu of the frameset. A completed example of the Discussion frameset is shown in Figure 25.16. The settings for the frameset are as follows in the Frame Wizard:
The My World Discussion TOC page, shown in Figure 25.17, displays if a user is not using a frame-compatible browser. It displays a list of the articles on your site. The page contains an Include bot beneath the line that reads "Note: you may need to reload this page to see the most recent additions." The Include bot places the _myworld/tocproto.htm page into the Table of Contents. There are no changes to make to this page.
The My World Discussion TOC (Framed) page isn't much to look at. Initially, it contains only the word CONTENTS, beneath which is an Include bot that places the contents of _myworld/tocproto.htm into the page. You will not need to make any changes to this page.
The My World Discussion Welcome page, shown in Figure 28.18, welcomes the user to the discussion and provides links to post an article to the site or search the site for a word or phrase. There are two links on this page that the user follows to post a new article to the discussion, and to search the articles for a word or pattern. You should assign these links a target frame of main, as you did with the Included Header and Included Article Header pages.
The confirmation page a user receives when he or she submits an article to the discussion contains one Confirmation Field bot, which is shown in Figure 25.19. The confirmation field returns the subject of the article in the confirmation form. There is a link on this page that tells the user to refresh the main page to see the new article appear in the list. Assign this link a target frame of main.
Figure 25.19 : The Discussion Confirmation Form contains one Confirmation Field WebBot.
The Search page for the My World Discussion, shown in Figure 25.20, is configured to search through the articles in the discussion. This is done by assigning the discussion group's directory (_myworld) in the Search bot, where you specify the Word List to Search.
Figure 25.20 : The Search bot is configured to keep track of only the articles in the discussion.
The default settings for the Search bot on this page are as follows
(you can edit any settings you want, except the Word List to Search
directory):
Label for input: | Search for: |
Width in Characters: | 20 |
Label for "Start Search" Button: | Start Search |
Label for "Clear" Button: | Reset |
Word List to Search: | _myworld |
Additional Information to Display: | File Date |
File Size (in K bytes) |
The Discussion Submission Form, shown in Figure 25.21, contains several form fields. You can add some of the other fields shown here to your discussion's confirmation form, if you like.
You need to customize the settings for the Category drop-down
menu as outlined in Chapter 21, "Fields-The Building Blocks
of Forms." For example, the choices in the drop-down menu
can focus on your topics of interest, as follows:
Web Page Development | Selected = Yes |
Creating Web Graphics | Selected = No |
Adding Interactivity | Selected = No |
Multimedia | Selected = No |
Other | Selected = No |
You also need to make a couple of minor changes to the Form Properties. Place the insertion point anywhere in the submission form, right-click, and choose Form Properties from the pop-up menu.
The Form Handler should already be set to WebBot Discussion Component.
Click the Settings button and make sure the settings in
the Discussion tab are the same as those listed here. You'll need
to add the title and check to display Time as an additional
field:
Title: | My World Discussion |
Directory: | _myworld |
Table Of Contents Layout fields: | Subject; From |
Additional form fields: | Date already checked; add Time |
Get background and colors: | _private/myworld_styl.htm |
Click the Confirm tab and check that the confirmation page is
set to the following:
URL of confirmation page: | myworld_cfrm.htm |
Click the Articles tab and make sure the settings are the same
as the ones listed here.
Header: | _private/myworld_ahdr.htm |
Footer: | _private/myworld_aftr.htm |
Additional Information: | Time, Date, and Remote computer name are already checked; add User name. |
You might remember that in previous Real-Life Examples chapters, you created a link to the My World Discussion page in your web when the user clicked a link to the discussion. Now you'll need to add links from that page to the framed and not-framed versions of your discussion group.
To add the links to your My World Discussion Page, follow these steps:
Chapters 23, "Java and Plug-Ins," and 24, "ActiveX and VBScript," introduced you to some very exciting web technologies and taught you how to utilize the commands in the FrontPage Editor to implement them. There are literally thousands of different Java applets, Netscape Plug-Ins, ActiveX components, JavaScripts, and VBScripts from which to choose.
Because of the vast amount of resources that are available to you, I'll leave the decision of what you should add to your Cool Stuff Pages up to you. You might prefer using Netscape Plug-Ins over Java applets, or ActiveX components over Netscape Plug-Ins. You might prefer online games or chats over multimedia. It's your call here, and you'll have a lot of fun searching for just the right components to add into the cool stuff section of your web.
With this last "Real-Life Examples" chapter, you know how to use all the features in FrontPage. The content of your Web site will change, I'm sure, as you learn more features and become even more familiar with the program. You've made a wise choice in choosing FrontPage for a Web authoring and web management tool! Continue to learn and grow with it; you have lots to work with!
In this chapter you added interactivity and enhanced features to your site, using FrontPage's advanced bots. You added a discussion group to your site, a guest book complete with confirmation page and a separate page for the users' entries, and a search page, so users can search through your entire site for words or phrases. The "Cool Stuff" section awaits, and that is where the fun really begins.
With this thought, I leave your Web site development in your hands. Add more graphics, background sounds, animations, and more É but most of all, have fun doing it!
The chapters in the following section discuss how to maintain your Web site, how to work with the FrontPage Server Extensions, and how to test and publish your Web site.
Q: | Can I configure a Search bot to place its results on a different page, rather than on the same page? |
A: | At the present time, no. The Search bot places the results on the same page. |
Q: | Can I create a discussion group that has a different section for each topic, instead of using multiple topics in the same discussion? |
A: | Yes, you can, but remember that you'll be adding several pages to your Web site for each discussion when you do. Your Web will be easier to maintain if you create multiple subjects in a single discussion group. On the other hand, if the discussion gets a lot of articles, it can be easier to locate specific subjects if you create several smaller discussion groups. Start with one and see how it goes! |
Q: | What's the best way to trim a discussion down when the article count gets too high? |
A: | One way to do it would be to periodically go through the discussion articles and select the best of the lot. Place the best articles on another Web page in an archive area, or zip the pages up into a file and provide a link to download the zip files of past articles. |