'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 } //--> Windows 98 Professional Reference -- Ch 29 -- Windows 98 as an Internet/Intranet Server


Windows 98 Professional Reference

Previous chapterNext chapterContents


- 29 -
Windows 98 as an Internet/Intranet Server



W indows 98 provides the tools you need to host and develop content for a web server from your computer. The Windows 98 Personal Web Server enables your computer to serve as a web server for an intranet site running on a closed network or an Internet site open to the public. With the Home Page Wizard and FrontPage Express, web development tools also come as part of the Windows 98 operating system. Whether you want to host an Internet or intranet site or just be able to test web pages on your computer before transferring them to another server, Windows 98 includes the web site tools you need to create a site and keep it running.

This chapter is designed to help you set up an Internet or intranet site using Windows 98. It also covers some of the things that you need to consider when setting up a site, such as determining what sort of content you will be providing. Finally, the chapter looks at how to create content for your site using FrontPage Express and other tools and how to implement such content as Dynamic HTML and Active Server Pages.

Some Initial Considerations

Before digging into the specifics of setting up an Internet or intranet site, it is important to first examine some basics, such as (1) the differences between these types of sites and (2) what sort of hardware you need.

This chapter defines an Internet site as one that is connected continuously, or at least periodically, to the Internet through a direct connection (such as through a leased line or a local area network connection) or a dial-up connection through an Internet service provider. It is generally not behind a firewall or other filtering device and can be accessed by anyone on the Internet. Conversely, an intranet site is accessible only by other computers that have access to your local or wide area network. Both Internet and intranet sites are usually referred to collectively as web sites in this chapter unless specified otherwise.

In general, you would use Windows 98 as a web server only if you expect to receive a small amount of traffic, such as less than a few hundred total site hits per day. Windows 98 is not really designed to handle a large volume of traffic, and it also lacks some of the more advanced features found in Windows NT. Thus your best bet is to use Windows 98 as a web server for intranet sites only because both traffic and security concerns are usually going to be lower on a local network.

For an intranet site, you will need to be connected to a network through a network interface card. In most cases (unless you are using some special third-party software), the TCP/IP networking protocol must be used by your computer as well as by everyone on the network who will be accessing the site.

If you want to set up an Internet site, you need to have a connection to the Internet. If you want people on the Internet to have continuous access to your site, you need an Internet connection through a local area network (with no firewall between your computer and the Internet to prohibit access to your computer) or some type of continuous modem connection, such as a leased line or a cable modem. Because a dial-up connection doesn't offer a continuous connection to the Internet, you can't use a dial-up connection unless you merely want to experiment with setting up a site or the site is available only during certain hours. Just as with an intranet site, you must configure your computer to use the TCP/IP networking protocol because TCP/IP is the central protocol used to transmit data over the Internet.

Even if you don't use Windows 98 to host an Internet or intranet site, you may want to install the web server if you maintain a web site on another computer. For example, if you create web pages for use on a personal web site or your company's web site that is hosted on another computer, you can use your computer to create and test the pages before transferring those files to the host computer. Indeed, this situation is probably the most common use for the web server that comes with Windows 98.

What's Included with Personal Web Server'

The Windows 98 Personal Web Server contains advanced server components previously found only in expensive web server programs designed to run on operating systems such as Windows NT and UNIX. Considering the fact that this software is provided free of charge, you are really getting a bargain by purchasing Windows 98 and installing this web server software.

The Windows 98 web server software components, all of which are installed through the Personal Web Server installation program, include the following:

Due to the complexity of many of the components listed here, this chapter limits its discussion to those that reside within the Personal Web Server software.

Installing Personal Web Server

Personal Web Server is a version of Internet Information Server (which runs on Windows NT) that has been tailored for use on a Windows 98 computer. Although it lacks some of the load handling and security additions found in Internet Information Server, Personal Web Server is a well-designed web server, which should suit your needs on a site with relatively little traffic.

Although this web server is included with Windows 98, it is not automatically installed as part of the Windows 98 installation. If you check in the Internet Explorer program group located off of the Start button, you will find an icon for Personal Web Server. However, if you click on this icon, Internet Explorer will open a web page on your computer that merely tells you how to install that tool from the Windows 98 CD-ROM.

To install the Personal Web Server:

1. Insert the Windows 98 disk into your CD-ROM disk drive.
2. Click the Start button and choose Run.
3. Type the following (substituting the actual drive letter of your CD-ROM for the letter D): D:\add-ons\pws\setup.exe.
4. Click the OK button or press the Enter key.

After you perform these steps, the Personal Web Server Setup program will run. On the main screen, press the Next button to advance to the screen where you select what type of installation you want to perform. The choices are Minimum, Typical, and Custom. If you are not sure which options to choose, then you should probably select the Typical installation. In most cases, you will find that the Typical installation contains everything you need to run your site.

Select the Custom installation if you want to see all available options. When you click this button, the Custom setup screen appears, as shown in Figure 29.1. Scroll through the various components to see the default selections. If you make no changes, you will be installing the same components as those selected in the Typical installation.

To see any available subcomponents that are available for the components shown on this screen, simply select the component and click on the Show Subcomponents button. For example, if you show the available subcomponents of the PWS component and then display the Documentation subcomponents, you can see that the Active Server Pages documentation is not installed by default. If you plan to use Active Server Pages, VBScript, or JScript on your site, you should probably select this option because the documentation that comes with Personal Web Server is actually quite good.

Figure 29.1

By choosing the Custom installation option, you can specify which elements to install with Personal Web Server.

After you have selected the custom components and subcomponents that you want to install, when you click on the Next button, you are asked to specify the home directory for your web site. If you choose the default, Personal Web Server creates your web site in the InetPub/wwwroot directory on the drive where Windows 98 is installed. Finally, you may be asked where you want to install the program files for Transaction Server. Again, unless you want to install these files in a different drive or directory, just accept the default.

The Personal Web Server Setup program will then install all selected components and subcomponents. After the installation is complete, you may be prompted to restart your computer.

When the installation settings are finalized, you will notice two new icons. One is the Publish icon, located on your Windows desktop. The other is an icon in your system tray that continuously indicates whether the web server is running. Double-clicking on either of these icons opens the Personal Web Manager window from which you can further customize and administer your web site, as discussed in the next section of this chapter.

Configuring Personal Web Server

After you install the Personal Web Server software on your computer, you may need to configure the site before using it. Microsoft has included the Personal Web Manager utility in Windows 98 to help you configure and maintain your web site. This section examines the functionality provided with that utility. However, before you begin setting up your web server and filling it with content, you should do some planning to help ensure that your site is organized, which will make it easier to use and maintain.

Planning Your Web Site

Before you actually start creating directories and content for your web site, you first need to spend some time planning the structure that you will be using for your site. In setting up your web site, try to plan its structure in a logical way. Because web sites use a directory structure (they are, after all, made up of directories located on a web server), set up your directories and subdirectories in a way that makes sense.

For example, if you are running a fairly small site, keep all your images in one folder so that you always know where to find them (preferably in a directory called "images" or something clear and simple) and keep related sets of web pages within the same directory. Don't wait until a directory starts getting too full to move files around, because your users might lose track of these changes. The reason is that users may have made bookmarks (also known as Favorites in Internet Explorer) for these pages, and when you move them, they will end up as broken links for those users. The best way to accommodate future growth is to try to plan ahead before you build a new page or set of pages and make sure that you put it in a sensible place when you first publish the page to your web site.

You should also keep at least one copy of everything that is on your web server on a detached computer or on a backup disk or tape for two reasons. The first reason is that you always want an extra copy in case your computer goes down and you need to transfer the information to another web server in a hurry. The second reason is that you need to edit and test your content properly to make sure it works before transferring it to the web server, and you want to work with a copy rather than the version that is on the web server. Even if you decide to edit the material in a separate directory on the same computer that functions as your web server, be sure to keep a copy of that material on another computer. The second computer can then either serve as an alternative web server or can be used to transfer the files to an alternative web server if the main web server computer goes down.

Security Issues

If you set up Personal Web Server correctly (as described in this chapter), it will make available to other users only the content of your root web directory and any other virtual directory that you add to your site. Unless you specifically convert a directory or its parent directory to a virtual directory--that is, by enabling web sharing for that directory--other users will not be able to see it. Further, unless you specifically enable directory browsing for your web site, users who do not know the file's name and location within your web server directory structure will not be able to view the file.

Some of the things that you can do to protect your computer from an attack are

For additional information on Internet security issues, be sure to read Chapter 30, "Internet Security."

Using Personal Web Manager

To help you administer your web site, Windows 98 includes a utility called Personal Web Manager. To access this utility at any time, double-click either the Publish icon on your Windows Desktop or the Personal Web Server icon located in the system tray. The Main page for Personal Web Publisher is shown in Figure 29.2.

Figure 29.2

Personal Web Manager provides an easy interface through which you can administer your web site.

The Main Page

The Main page contains a button to stop and start the web server (which is a service running on your computer), as well as a reporting area where you can view statistics about your web site. You might want to stop the web server if you aren't using it because your computer runs marginally slower while the server is running. You might also want to stop this service if you experience errors or other problems with the web server. Stopping and restarting the service can sometimes fix any problem you are experiencing.

If you prefer, you can also pause the web service by choosing Pause Service from the Properties pull-down menu. By pausing the service, you can stop it without fully unloading it, which means that you can restart it more quickly.

The Main page also displays the statistics for your site, such as how many site hits you have had. The types of reports that you can view are Requests by Day, Requests by Hour, Visitors by Day, and Visitors by Hour. Requests refer to total requests, not just total page requests. Thus if a page consists of HTML plus three images on that page, a request for this page usually registers as four requests: one for the HTML found on the page and one request for each image. (The images on the web page are stored in different locations.) Similarly, the number of visitors might not be correct because of the way that web sessions are opened and closed. If a person visits your site more than once within a few minutes, the web server may count that person as more than one visitor. Thus the reports that you get from the Personal Web Manager might not always be accurate.

From the Main page, you can access any other Personal Web Manager page by either selecting that page's icon from the left pane of this window or choosing the page from the View pull-down menu. We look at each of those pages next except for the Publishing Wizard and the Home Page Wizard, both of which are covered in the section on creating content for your web site. Before you go any further in the Personal Web Manager, however, you might want to take the Personal Web Server Tour by clicking on the Tour icon in the left pane.

Taking the Tour

When you open the Tour page, the large right pane changes and an interactive tour becomes available. This tour provides an overview of the Personal Web Server and offers a few hints and tips along the way. If you have never used a web server, you may find the information especially helpful. Even if you have used other web servers, this quick tour provides a few useful tips for using the Personal Web Server.

Setting Advanced Options

You can view the Advanced settings page by clicking on that page's icon in the left pane. This page enables you to view and add virtual directories to your site, determine the default document for your site, allow directory browsing, and save an activity log (see Figure 29.3).

Using Virtual Directories

Virtual directories enable you to add directories to your web site even if they are not physically located in the root directory for your web server, which by default is your Inetpub\wwwroot directory. Any directory located on your computer or on any network drive to which you have access can be defined as a virtual directory. Although you can add directories by using the Add button located on this page, another example of how easy it is to make a directory into a virtual directory on your web server is to select any directory within Windows Explorer.

Figure 29.3

You can use the Advanced Options page in Personal Web Manager to perform tasks such as adding virtual directories and enabling directory browsing.

From Windows Explorer, right-click on a directory and select Properties. Click on the Web Sharing tab on the properties sheet and choose the Share This Folder option. Another window pop ups. In the Alias box, enter the name of the virtual directory on your web server for which this directory will be known (see Figure 29.4). For example, if you want people to access this directory on your web server by typing http://yourservername/downloads, then give this directory an alias of downloads. When you click on the OK button, a virtual directory named download will be created on your web server.

In addition to creating virtual directories, you can determine which rights viewers will have to that directory. If you select a virtual directory from the Advanced page of the Personal Web Manager and click on the Edit Properties button, a window will appear with three separate access options: Read, Execute, and Scripts. In most cases, the read and scripts options are selected by default, and they are the options that you would normally want to select. The read option enables viewers to view pages in this virtual directory. The scripts option allows the web server to process any scripts contained on those pages. If you expect to use ASP in this directory, then you must enable the scripts option; otherwise, the server will not process the server-side scripting on those pages. Finally, the execute option enables viewers to run any executable programs or commands that are found in the virtual directory on the web server. Due to obvious security concerns that may arise from allowing viewers to execute programs on the server, you will almost always want to disable this form of access, particularly on an Internet site.

Figure 29.4

You can convert any directory into a virtual directory on your web server.

Determining the Default Document

The default document name for your web site is the HTML or ASP document that your web server looks for when a user requests information from your home address or from a directory without naming a particular page. By default, these document names are Default.htm and Default.asp. Thus if a viewer enters the URL http://www.yoursite.com, where yoursite is a link to your web site, the web server would look for a document named Default.htm or Default.asp in the root directory of your web site (normally InetPub/wwwroot). The server would then process that page and pass the HTML back to the viewer's browser.

If you want to change the default document names, you can do so from the Advanced page in Personal Web Manager. In many cases, it is a good idea to add an HTML page that uses one of these default names into each directory on your web site. Doing so ensures that users who do not request a specific page will see a page that indicates the directory's contents. Those users can then view other pages by clicking on links from that HTML page. A good practice is to name the home page in each directory by one of your default document names. Then name the server so that it can automatically select that home page when the user enters a root or directory site without requesting a specific page.

Directory Browsing

As discussed in the previous section on default documents, if a user enters a directory name in the URL for your web server, but does not specify any page within that directory (for example, http://www.yoursite.com/directory), the web server will display the default document for that directory. However, if no default document exists in that directory, an error will usually be returned to the user's browser, indicating that he or she does not have the right to browse the directory. In other words, directory browsing is not enabled by default in the Personal Web Server.

What is directory browsing? As the name indicates, the directory browsing feature enables you to view the entire contents of a web server directory from which you can select any page that you want to view. If you have ever seen the contents of an FTP site directory displayed within your browser, then you have seen what directory browsing looks like to a viewer.

In some cases, you might not care whether viewers can see the entire listing of every directory. However, it is usually best not to enable directory browsing because it can open up a large security hole by allowing other people to see the entire structure of your site. This information might help an unscrupulous viewer hack into your site. Nevertheless, if you want to enable directory browsing, then you can do so by selecting that option on the Advanced page. that the directory browsing option applies to your entire site, and Personal Web Server has no way to limit directory browsing on individual virtual directories.

Activity Log

One form of security that you can implement on your site is to use the activity log option found on the Advanced page. This feature maintains a log of every user who connects to your site and tracks every page that users request. The log file is maintained in an Internet standard format and should be automatically stored in the Log File/W3SPC1 folder found in your Windows System directory. This file can be viewed by any text editor. The filenames will likely begin with the letters nc and are followed by a date designation. Thus a file generated in December 1998 will begin with nc9812. The log file indicates the IP address of the user accessing your site, the exact page accessed at your site, and each specific file requested.

Activity log files can get very long and can cause some level of system degradation if you have a lot of traffic on your site. Therefore, you might want to disable activity logging unless you are experiencing security problems, such as people trying to break into your site.

Creating Content for Your Site

After you install Personal Web Server and set up your web site, you will need to either create new content for that site or import existing content, for example, from another web server that you previously set up. To import content, you can copy files to your web site directories in the same manner that you copy other files to your computer. This content can be copied to your computer either from a disk or from a network or Internet connection (such as by using FTP to transport files from another web server).

This section explains how to create content for your site by using the tools supplied with Windows 98. However, equally important to exploring the tools used to create this content is the planning that should precede this task. Just as you need to organize the structure of your web site, it is also important to determine what type of content you will be providing and what limitations might prevent you from effectively reaching your target audience. This section begins by briefly addressing some of these basic considerations; then you learn how to create this content and take a quick look at two relatively new types of Internet content: Dynamic HTML and Active Server Pages.

General Considerations

Windows 98 contains the tools you need to build content for and run a web server. When you are developing content for a web site and deciding how to build the site, you need to consider who your audience is and what type of content you are trying to provide.

Know Your Audience

To properly plan for and implement a web site on your Windows 98 computer, you need to determine who will be viewing your site. Will it be employees from within your company accessing an intranet site? Will it be clients coming in from the outside and accessing an Internet site? Both? Who your audience is and where they are coming from have a lot to do with what sort of content you provide, as well as the manner in which it is supplied.

For example, how will your audience connect to your site? If it is an intranet site and if everyone uses the same web browser on a Windows 95, Windows 98, or Windows NT computer, then determining how you will provide content to your viewers is easier. On an intranet site where every viewer is connected to your web server over a local area network, you don't have to concern yourself as much with connection speeds and how long it will take the user to download graphics from your pages to their browsers. However, you still have to consider network congestion issues that may arise if your content requires lots of trips back and forth to the web server.

If you are running an intranet with Windows 95, 98, and NT clients, you can also use ActiveX controls, VBScript, and other Microsoft-centric web elements without being concerned about whether these programming components will work properly on the users' computers. Additionally, if everyone on your intranet uses a single web browser such as Internet Explorer, it is much easier for you to know that your web pages will appear virtually identical on every computer.

Unfortunately, even if your site does run on an intranet, you probably won't have all 32-bit Windows clients because you may have computers running Windows 3.1, MS-DOS, Macintosh, or UNIX as their operating system. Thus depending on your network configuration, you may have to make at least some modifications in the type of content you present to ensure that everyone has the capability of viewing and interacting with material on your site. Similarly, if you have Internet traffic on your site, you will have a broad range of compatibility issues to consider, some of which are discussed in more detail later in the chapter.

Know the Content Your Audience Wants or Needs

For a site to be a success, it must be visually easy to understand and must provide something of worth to the viewer. If people browsing your site can't find their way around, or if there is nothing of particular interest for them, they probably won't be visiting your site again anytime soon, if ever. Thus once you determine who your audience is, you need to decide what content you can place on your site to keep them coming back again and again.

For example, if you are designing a company intranet, think about what sort of information the employees would want to see. For example, your home page might have some content that changes regularly, such as headlines for company news that link to the entire story. Although many companies put such items as their office manual and employee directory on their intranet, there are much more interesting things you can provide. If your company is publicly traded and many of the employees own stock in the company, you can set up a page where users can enter the total number of shares that they own. They can then click a button that tells the web server to obtain the latest share pricing information and multiply that by the number of shares to return a web page showing the total current value of their investment. Alternatively, you could use an ActiveX control in the form of a stock ticker to enable employees to keep up-to-date on the latest price. If the employees are running Internet Explorer 4.0 with the Active Desktop option enabled, they could even place this stock ticker on their desktop where they can see it even if their web browser isn't running.

Other possible interesting uses for an intranet site include publishing weekly newsletters, displaying today's lunch menu from the cafeteria, providing electronic versions of company forms that can be processed on-line, and giving users the ability to check the current value of their company-managed retirement holdings. The breadth of the type of content that you can provide is limited only by your imagination. Even if a site is used only for internal purposes, there are still a lot of ways to make it interesting, keep the users happy and coming back for more, and ensure that your organization is getting a meaningful return on its investment.

For an Internet site, the goal is to provide content that will keep your audience coming back on a regular basis so that they can see new product announcements and other information. If you work for a software development company, providing trial versions of your software, free bug fixes, and updated technical support information are good ways to keep your customers happy and interested. Again, the type of information that you can provide is virtually unlimited, and your goal should be to try to provide the type of content that you think your viewers might want. Be sure to provide links on your home page and elsewhere that make it easy for viewers to feedback on your site via email so that you can find out what they like and hate about your site.

Handling Compatibility Issues

If most or all of your viewers are coming from the Internet or if many types of computers are used on your local or wide area network to access an intranet, the decision of how to program your site becomes much more complicated because of potential compatibility issues. Rather than using ActiveX controls or VBScript, you might consider sticking to elements such as Java applets and Java Script, both of which are supported by a variety of browsers, if you need to use anything other than standard HTML to format your pages. You will also have to test your site fairly extensively with a variety of browsers and screen resolutions. Each browser displays HTML differently, and even though Java is supposed to run equally well on all platforms, different browsers handle Java through various compilers and virtual machines with the result that what works fine on one browser causes problems on another. Even if you limit yourself to testing your pages in Microsoft Internet Explorer and Netscape Navigator, your viewers will be using several different versions (including interim versions) of these browsers to visit your site.

Some web authors handle these problems by preparing multiple versions of pages on their sites. Their web server detects which browser is being used by a viewer and directs the browser to the most compatible page. This approach causes a lot of extra work on the part of the web author, but many people view this solution as a necessary evil. Other authors handle these compatibility issues by either writing primarily to one browser (presumably the one that most of their viewers use) or else simply giving up some web site functionality in lieu of compatibility.

Although various opinions exist as to how to handle these compatibility issues, the best and most time-efficient solution may be to maintain a single set of web pages and write them in such a way that every browser can see and interact with the most important aspects of your site. You can then program additional "bonus" content that is visible with one or more browsers that a significant portion of your viewers use.

For example, if your viewer uses Internet Explorer 3.0 or later, you can place an ActiveX control on a page that displays an activation button. Pressing that button activates VBScript on the page and causes the browser to perform some action, such as loading a different web page or downloading a file.

However, viewers with browsers that don't recognize ActiveX controls still need to have access to that capability. Therefore, you must place something such as a standard hyperlink on the page to enable those users to access the same information without pressing the button. Viewers with browsers having the capability of seeing this button (see Figure 29.5) may think "hey, what a neat button," whereas those without the capability won't even realize that they are missing anything. This small example demonstrates one way to provide content that is useful to everyone while providing additional appeal to those using a browser for which you are writing a particular feature.

In addressing compatibility issues, one factor that works in your favor is that browsers do not display content that they do not recognize. Thus in the preceding example, browsers that do not recognize ActiveX controls simply skip over that code. Although Microsoft and Netscape, the two principal software development companies that make web browsers, have pledged to adhere more strictly to HTML standards in the future, the browsers do handle some technologies (such as Dynamic HTML and channels) in different ways. A way to work around this problem is to supply the code necessary for both browsers on the same page. The Netscape and Microsoft browsers process only the code they recognize (they ignore the other code), thus giving you the result you want in a single web page.

Figure 29.5

The button on this web page is visible to some browsers; for others, this web page provides backward compatibility in the form of hyperlinks and standard HTML.

Using the Home Page Wizard

Windows 98 provides two main tools designed to create web site content: the Home Page Wizard and FrontPage Express. The Home Page Wizard (see Figure 29.6) is launched by clicking on the web Site icon in Personal Web Manager. Similar to wizards in other Microsoft products, Home Page Wizard walks you through the steps needed to create a default home page for your web site.

As you step through the wizard, it asks you to choose from among several templates that can be used to determine how your web page will look. Unfortunately, the wizard does not give you a very good idea of how this template will look until later in the process of creating your site. You will have to use the trial-and-error method of using a template and then choosing a different one later if it doesn't suit you.

You will be given the option to include a guest book and to add a drop box on your site to make it easy for people to send you email. The guest book enables both you and other users to view comments left by viewers, and the drop box enables users to send you messages through the web server. You can view these messages by clicking on the Web Site icon in the Personal Web Manager anytime after you set up your home page using the Home Page Wizard. You can also click on the Web Site icon to use the Home Page Wizard to make additional changes to your home page. To create pages other than your main (home) page, however, you will have to move on to FrontPage Express.

Figure 29.6

The Home Page Wizard makes it easy to assemble a basic page for your web site, such as the one shown here.

Using FrontPage Express

FrontPage Express is the HTML editor that comes with Windows 98. Although it has many of the HTML editing features that come with the full Microsoft FrontPage editor, it lacks most wizards and the site management tools that come with FrontPage.


TIP: When you install Windows 98, FrontPage should automatically be registered as the default editor for any HTML files located on your computer. If it isn't or if you want to change the default editor to something other than FrontPage Express, then you will need to change the file registration information for HTML files to use FrontPage Express as your HTML editor. To do so, open Windows Explorer and choose Options from the View pull-down menu. Select the File Types tab and scroll down until you see a file type such as Microsoft HTML Document 4.0 that will be associated with files that have the extension of HTM and HTML. Select that file type and click on the Edit button. In the Actions window, select the New button. In the next window that pops up, type Edit into the Action textbox. Click the Browse button to locate and select the executable file for FrontPage Express or any other HTML editor that you want to use (the default location for FrontPage Express is C:\Program Files\Frontpage Express\bin\Fpxpress.exe). Then click OK to close this window and click OK again to register your selected editor. From now on, anytime you right-click on an HTML file and choose Edit, the new default editor you selected will launch and display the selected file.


When you open FrontPage Express, it contains a blank page. If you start typing text, it will appear on the open HTML page just as if you were typing in a work processing program such as WordPad. If you have not used an HTML Editor before, try using the pull-down menus and toolbar buttons to insert horizontal lines (to break up sections of your page), insert images and animation, place a timestamp on your page through the WebBot feature, and include background music that can play while someone is looking at the page. You can also insert ActiveX controls and set their properties on your page. With a small amount of tinkering, you might end up with a page that looks like the one in Figure 29.7.

Figure 29.7

FrontPage Express is a simple HTML editor that supports the basic features you need to create a web page.

Although FrontPage Express does not include all of the features found in the full FrontPage product, many users find that it is all they need for editing HTML documents. In fact, many web site developers use simple text editors (such as the NotePad application that comes with Windows 98) to create their web pages. FrontPage Express is an effective tool that allows the average person who doesn't need site management tools and who doesn't plan on using frames or other advanced elements to create web pages without having to know any HTML.

that FrontPage Express does contain some basic predefined pages for creating forms or surveys to which users can respond. To access these predefined pages, choose New from the File pull-down menu and then select the type of page that you want to create. You can also create and change tables in your web pages by using the available options in the Table pull-down menu. Tables are commonly used on web sites to layout and display text, graphics, and other content in a way that is not possible with plain HTML.

To use other advanced HTML features, you can add them directly into the source code by either choosing HTML Markup from the Insert pull-down menu or by choosing HTML from the View pull-down menu. The latter method opens a separate window in which you can directly edit all the HTML for the page. One disadvantage of using FrontPage Express is its anemic help documentation. For the most part you are on your own if you have any questions about how to use FrontPage Express' features. Fortunately, any book written about the most recent version of FrontPage should be able to answer any questions you might have about FrontPage Express.

Using the Publishing Wizard

After you create your web site content and test it with one or more web browsers, you may want to transfer these files to another web server. Most people develop and test content on their local web server before moving it to another web server, such as one provided by their Internet Service Provider, where it will be viewed by other people. In such a case, you can use the Publishing Wizard to transfer your web site files to any other web server.

Developing with New Content Types

Since the release of Windows 95, Microsoft Internet Explorer 3.0 and 4.0 have brought a host of new content possibilities to Windows 98-based web sites, such as the use of ActiveX controls, scripting based on Visual Basic and Java, and cascading style sheets. With Internet Explorer 4.0 comes new content that can be implemented on your Windows 98 web site and viewed on computers running Internet Explorer 4.0. This section explains how to add some of the newest content types to your Windows 98 web site.

Dynamic HTML

Windows 98 and Internet Explorer 4.0 introduce a new level of interactivity in web pages with Dynamic HTML. Originally code-named Trident and planned for inclusion in Internet Explorer 5.0, Dynamic HTML enables you to create web pages with which your viewers can easily interact to dynamically change the content of the page without requiring repeated trips back to the web server for the requested material. You can place graphics on your web site that change and move about the page either on their own or due to actions of the viewer. Client-side scripting, ActiveX controls, and other features enable you to use Dynamic HTML to make your web pages much more interesting.

Rather than serve as an overall discussion of Dynamic HTML, this section provides a sample of what the code used for this new content actually looks like and explains how it works in a web page.

Internet Explorer 4.0 introduces a new Dynamic HTML Document Object Model to replace the one found in Internet Explorer 3.0. One of the features of the new object model is the use of scripting (VBScript in the following example) to trigger certain events when a user interacts with a page, such as when the user's mouse passes over an image or area of text.

In Listing 29.1, Visual Basic scripting defines three different ways in which the browser can respond to the viewer's interaction with the page (see Chapter 33, "Windows Scripting with Windows 98 Scripting Host," for more on VBScript). In the first two subroutines, if the viewer moves a mouse over the wrong image, a dialog box tells the user to try again. This behavior is accomplished through the onmouseover event, although you can also use events such as onclick and onkeypress to provide different ways for the code to execute. that the code in the first two subroutines references the wrong images (wrong1 and wrong2), and the third subroutine displays the message of the day when the viewer moves the mouse over the correct image (right1) will appear. The images themselves are coded with an id tag so that VBScript can identify them and respond properly when the viewer moves his or her mouse over a selected image.

Listing 29.1  This Example Shows Some Basic Dynamic HTML Scripting

<html>
<SCRIPT LANGUAGE="VBSCRIPT">
SUB wrong1_onmouseover
    Msg = "Sorry, wrong image.  Try again."
        Style = vbOKOnly + vbInformation
        Title = "Sorry"
        Response = MsgBox(Msg, Style, Title)
END SUB
SUB wrong2_onmouseover
    Msg = "Sorry, wrong image.  Try again."
        Style = vbOKOnly + vbInformation
        Title = "Sorry"
        Response = MsgBox(Msg, Style, Title)
END SUB
SUB right1_onmouseover
    Msg = "Today's message: Have a great day!"
        Style = vbOKOnly + vbInformation
        Title = "You got it!"
        Response = MsgBox(Msg, Style, Title)
END SUB
</SCRIPT>
<head>
<title>The Message Game</title>
</head>
<body bgcolor="#FFFFFF">
<h2 align="center">The Message Game</h2>
<p>Can you find the hidden message? <img id=wrong1 src="FolderC133.gif"
width="24" height="19"></p>
<p>By moving your mouse over the correct image you will get
today's message.<img id=right1 src="CD-ROMC2B4.gif" width="20" height="17"></p>
<p>Good luck. <img id=wrong2 src="Pencil_and_PaperD1F1.gif" width="20"
height="18"></p>
</body>
</html>

When this page is loaded into an Internet Explorer 4.0 browser window, the viewer sees what appears to be a standard HTML page containing some text and a few images. However, as provided by the preceding code, when the viewer moves a mouse over an image, a dialog box automatically pops up and tells the viewer whether he or she has chosen the correct image, as shown in Figure 29.8.

Figure 29.8

This screen shows how the preceding HTML code appears when the viewer passes a mouse over the correct image.

This fairly basic example of Dynamic HTML should give you an idea of the ways in which you can take advantage of this new capability on your web site. To get more information on Dynamic HTML, you can download the Internet Client Software Development Kit (SDK) from Microsoft's web site at http://www.microsoft.com/msdn/sdk/inetsdk/asetup/default.htm.

Using Active Server Pages

One of the most interesting features found in Personal Web Server is its support for ASP. Introduced first in Internet Information Server 3.0, ASP is a way to use server-side scripting to create dynamic web sites while shielding the script from the eyes of users who visit your site, thus protecting your scripting work.

What is server-side scripting? Simply put, it is scripting that runs on the web server and performs various tasks just as a server might do in any other client/server application that you design. This type of scripting should be contrasted against client-side scripting, in which script is downloaded to, and processed by, the user's web browser as part of HTML. The preceding section on Dynamic HTML contained an example of client-side scripting. Although a site that uses ASP might also use client-side scripting, ASP provides capabilities far beyond those of a browser. There are a lot of advanced things that you can do with ASP, such as allow your users to view and change information on databases located on your web server or on another computer on your network. You can also create session variables that are maintained from page to page and that are unique to a particular user as long as they are connected to any of your web pages. Another use of ASP is to redirect a web browser to a different page--for example, if the page has moved to a new location.

When the Personal Web Server processes server-side scripting and renders HTML, the resulting source code appears no different to the web browser than if ASP was not involved at all. For example, ASP scripting generated the second to last sentence on the web page in Figure 29.7. While it appears within the browser and the source code sent to the browser as standard HTML, a simple ASP script renders this HTML and writes it to the source code delivered to the user's browser.

For detailed information and several tutorials on using ASP in your web pages, be sure to see the online documentation provided with Personal Web Server. ASP documentation is not installed by default, so refer to the previous section on installing Personal Web Server for information on installing this documentation as part of a custom setup.

Conclusion

Microsoft has provided a simple yet powerful web server with Windows 98. You can use Personal Web Server to set up a web site for limited intranet or Internet use. Several tools are also provided to create and maintain content on your web site. Through support for client and server-side scripting, Personal Web Server also supports the latest functionality for developing dynamic web sites that will attract users to your site. Then it is up to you to use the content and site organizational guidelines outlined in this chapter to keep your viewers coming back for more. With a little effort, even a novice can create interesting web sites with Windows 98.


Previous chapterNext chapterContents

Copyright, Macmillan Computer Publishing. All rights reserved.