Creating the Pages

To begin the application, you'll create the two pages needed for it to work and rough out the static content. Once that is in place, you can add the individual pieces of functionality one at a time. Until then, though, you're doing just plain HTML authoring.

  1. Open generic_template.asp, and save it as tourprice_processor.asp, and then save it again as tourprice.asp.

    You have created two pages based on the template, and one of the pages, tourprice.asp, is open in Dreamweaver.

  2. In the toolbar, change the page title to Newland Tours: Tour Price Calculator. In the main document, change the title so it reads Tour Price Calculator. Then type the following text as the body text:

    Enter the number of adults and children in your party as well as the tour name of the tour you want to calculate.

    All fields required (enter 0 if necessary).

    Beneath this text you will create a form, but for now, this file is done.

    graphics/07fig02.jpg

  3. Save and close tourprice.asp. Open tourprice_processor.asp.

    Creating the second page is much like creating the first.

  4. In the toolbar, change the page title to Newland Tours: Tour Price Calculator. In the main document, change the title so it reads Tour Price Calculator. Then type the following text as the body text:

    The estimated cost of your tour is XXX.

    Prices include hotel, accommodation, and travel expenses during the tour. They do not include airfare to the starting destination.

    Calculate another tour.

    Contact one of our qualified agents.

    Later in this lesson, the placeholder text string XXX will be replaced with the amount output from the ASP/ColdFusion script.

    graphics/07fig03.jpg

  5. Select the XXX placeholder text, and click the B button in the Property inspector to apply bolding to the text.

    Just because the eventual output will be generated dynamically using ASP doesn't mean that you can't format the text the way you want it to appear.

  6. Select the word Calculate, and use the Property inspector to link it to tourprice.asp. Select the word Contact and link it to contact.asp.

    Visually, aside from the placeholder text, this page is ready. You'll add two significant pieces of functionality to it later in the lessonserver-side form validation and the tour price calculation itselfbut these functionalities will be created with scripting and will be invisible to the user.

    graphics/07fig04.jpg

  7. Save and close tourprice_processor.asp.