Adobe Dreamweaver CS3 Uživatelský manuál Strana 632

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 738
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 631
DREAMWEAVER CS3
User Guide
625
To add an HTML form to a search page, complete the following procedure.
1 Open the search page or a new page, and select Insert > Form > Form.
Anemptyformiscreatedonthepage.YoumightneedtoenableInvisibleElements(View>VisualAids>Invisible
Elements) to see the forms 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, options, 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.
3 Add a Submit button to the form (Insert > Form > Button).
4 (Optional) Change the label of the Submit button by selecting the button, opening the Property inspector
(Window > Properties), and entering a new value in the Value box.
Next, youll 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 the
following image shows:
6 In the Action box in the forms 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,
dont 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.
See also
About search and results pages” on page 624
Creating forms” on page 600
Build a basic results page (ColdFusion, ASP, JSP, PHP)
When the user clicks the forms Search button, the search parameters are sent to a results page on the server. The
results page on the server, not the search page on the browser, is responsible for retrieving records from the database.
Ifthesearchpagesubmitsasinglesearchparametertotheserver,youcanbuildtheresultspagewithoutSQLqueries
and variables. You create a basic recordset with a filter that excludes records that don’t meet the search parameter
submitted by the search page.
Note: If you have more than one search condition, you must use the advanced Recordset dialog box to define your
recordset (see “Build an advanced results page (ColdFusion, ASP, JSP, PHP)” on page 627).
September 4, 2007
Zobrazit stránku 631
1 2 ... 627 628 629 630 631 632 633 634 635 636 637 ... 737 738

Komentáře k této Příručce

Žádné komentáře