Level C — Web Client Details

   

The Web user interface for the Island Hopper News sample Level C is implemented in a series of Active Server Pages (.asp) files.

File Reference

The following table lists the main files in the Web user interface by name and purpose.

File name Purpose

AdConfirm.asp

Called by AdEntry.asp after you submit the ad form. This page checks the input on AdEntry.asp, updates user data, and inserts the ad into the database.

AdDisplay.asp

Displayed when you click Browse an Ad on the Browse/Place an Ad page. On this page, you can click to select an ad category. After you select an ad category, the page calls AdsList.asp to get the list of ads for the category from the database and display the titles of the ads. You can click on an ad title to display the ad. You can click Place an Ad if you want to place an ad; doing so displays AdEntry.asp.

AdEntry.asp

Displayed when you click Place an Ad on the Browse/Place an Ad page. On this page, you can provide information about your ad using a form. You can click Preview to see what your ad will look like, and click Clear to clear the fields in the form. Clicking Preview displays AdConfirm.asp.

AdsList.asp

Called by AdDisplay.asp after you select a category to populate the list of ads in that category.

Browse.asp

Displayed when you click Classified Ads on the Island Hopper Headlines page. From here, you can browse or place an ad. Clicking Browse an Ad displays AdDisplay.asp; clicking Place an Ad displays AdEntry.asp.

browserCheck.vbs

Called by each .asp file to check the Internet Explorer version. If the browser version is not Internet Explorer 4.0, calls getMSIE4.htm, which displays a message advising you to upgrade your browser.

Code.asp

Called by ViewSource.js to display the source code for a particular page. Code.asp in turn calls CodeBrws.asp.

CodeBrws.asp

Called by Code.asp to format and display a page of source code.

CustMaint.asp

Called by Browse.asp to create a new customer account.

Default.htm

Loads Headlines.asp.

getMSIE4.htm

Displayed if the browser version is not Internet Explorer 4.0.

Headlines.asp

Main screen of the Web application. Shows the front page of Island Hopper News. From here, you can click on Classified Ads to go to the Classified Ads application (Browse.asp); all other links redisplay this page.

Login.asp

Displays messages about logging in status, depending on where user came from.

NavigationBar.js

Displays the navigation bar at the bottom of all pages.

strFile.vbs

Contains all text strings for the Web version of the application.

ViewSource.js

Displays the View Source button on pages.

File Flow

  1. When you start the Web version of Island Hopper News, the Default.htm page loads and immediately calls Headlines.asp.

  2. From Headlines.asp, click the Classified Ads link to go Browse.asp. All other links redisplay Headlines.asp.

  3. Browse.asp is the main page for the Classified Ads application. This is where you choose whether to browse or place an ad. Processing for each of these choices is shown in the following table.
    If you choose... Browse.asp calls...
    Browse an Ad AdDisplay.asp
    New User CustMaint.asp
    Place an Ad AdEntry.asp

    You must log in with an e-mail address and password before you can browse or place ads.

    AdDisplay.asp calls AdsList.asp after you select a category in the Categories list. AdEntry.asp calls AdConfirm.asp after you preview your ad and click Submit.