Building the search page

Building the search page

A search page on the web typically contains form fields in which the user enters search parameters. At minimum, your search page must have an HTML form with a Submit button.

To add an HTML form to a search page:

  1. Open the search page or a new page, and select Insert > Form > Form.

    An empty form is created on the page. You might need to enable Invisible Elements (View > Visual Aids > Invisible Elements) to see the form’s boundaries, which are represented by thin red lines.

  2. Add form objects for users to enter their search parameters by selecting Form from the Insert menu.

    Form objects include text fields, menus, checkboxes, and radio buttons. You can add as many form objects as you want to help users refine their searches. However, keep in mind that the greater the number of search parameters on the search page, the more complex your SQL statement will be.

    For more information on form objects, see Inserting HTML form objects.

  3. Add a Submit button to the form (Insert > Form > Button).
  4. If you want, change the label of the Submit button by selecting the button, opening the Property inspector (Window > Properties), and entering a new value in the Label text box.

    Next, you’ll tell the form where to send the search parameters when the user clicks the Submit button.

  5. Select the form by selecting the <form> tag in the tag selector at the bottom of the Document window, as shown:

    This is a picture of the feature being described.

  6. In the Action text box in the form’s Property inspector, enter the filename of the results page that will conduct the database search.
  7. In the Method pop-up menu, select one of the following methods to determine how the form sends data to the server:
    • GET sends the form data by appending it to the URL as a query string. Because URLs are limited to 8192 characters, don’t use the GET method with long forms.
    • POST sends the form data in the body of a message.
    • Default uses the browser’s default method (usually GET).

The search page is done. Next comes the results page. For more information, see Building the results page.

Related topics

  • About search/results pages


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Reference
Building ASP.NET Applications Rapidly
Building ASP and JSP Applications Rapidly