Tom Muck

Alpha Dog Blues Band
Home page
All articles
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Dynamic Search

Three Steps to Dynamic Searching Using the Dynamic Search Suite

  1. Create a Master/Detail page set using the Master/Detail Pageset* application object.
  2. Add a search form to the Master page. This can be one of the search form extensions from the suite or your own search form.
  3. Add the Dynamic Search server behavior to the Master page.

With these 3 items in place, you can now do dynamic searches using a complete master/detail page set. Let's break that down so that you can see just how easy it is:

STEP 1: Create a Master/Detail page set using the Master/Detail Pageset application object.

Start with a blank page named master.asp (or master.php or master.cfm).

Click Insert > Application Objects > Master Detail Page Set.

The Application Object will prompt you to create a recordset. Using the Bettergig database as an example (from the book Dreamweaver MX: The Complete Reference), create a new recordset using the SQL statement:

SELECT * FROM getJobs

Choose the fields that you want on the Master page, and the fields that you want on the Detail page. In this case, I've chosen JobLocation, JobTypeDesc, and EmpName for the master.cfm page, and all fields for the detail.cfm page.

STEP 2: Add a search form to the page. This can be one of the search form extensions from the suite or your own search form.

In this case, we'll apply a search form from the Dynamic Search Suite to the master page. Choose Form 2 from Server Behaviors > DW Team > Search > Add Search Form.

STEP 3: Add the Dynamic Search server behavior to the Master page.

On the master.cfm page, add the Dynamic Search server behavior by clicking Server Behaviors > DW Team > Search > Dynamic Search SQL

There are several options in the extension that need to be filled out.

On tab 1, choose the following fields to add to the dynamic search. Each one of these fields can be added one at a time, and will cause the extension to write the appropriate SQL on the fly to search each field:

  • EmpName
  • JobLocation
  • JobDescription
  • JobTypeDesc

Choose the field named search to be the search field for the page. The search field can be on another page as well.

Click the Advanced tab to switch to tab 2 (optional features).

Type in the form field name anyallexact (added by the search form) to be the optional form field for any words.

Type any for the Equal To box for that field.

Type in the form field name anyallexact (added by the search form) to be the optional form field for exact phrase.

Type exact for the Equal To box for that field.

Check the box for Return No Records if No Search Result. This causes the SQL to return nothing, unless the search field is filled in.

Click OK.

Save the master and detail pages. Try them out. You should be able to conduct searches now on all four of those database fields using any of the advanced options of the extension. The pages created using the above steps are here.

Another part of the suite is the Accented Search Words. This allows you to highlight the search terms in the result:

The Dynamic Search Suite is available for the following languages:

ASP/VBS

 

ColdFusion

 

PHP

 

* The Master/Detail pageset functionality is not available in the "stock" DW MX configuration for PHP_MySQL, but is available from third parties as an add-on. The functionality can be duplicated easily as well, with a Recordset and Dynamic Table on the Master page, and a Recordset and manually created table on the Detail page. The functionality was added to DW MX 2004.

Tom Muck

Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
About | Privacy Policy | Contact | License Agreement | ©2002-2024 Tom Muck | Dreamweaver Extensions