Recipe 2. Employee Lookup

What was the killer app that truly launched the Web? An easy-to-use but powerful search engine named YAHOO!. Adding a search facility to a Web site is one of the most common server-side goals. Similarly, one of an intranet's primary workhorses is often a special-purpose search engine: the employee lookup application. The ability to locate someone quickly and efficiently in an organization is key.

Search engines run the gamut from very straightforward to very advanced, both in features and implementation. The most basic search function one that checks a single data source field for a word or phrase is easy to create; you can do it in Macromedia Dreamweaver using nothing more than the simple Recordset dialog. However, any attempts to make the search even a little more powerful, such as adding the ability to search multiple fields or include multiple keywords, significantly ramps up the coding complexity.

The Employee Lookup application includes examples of two kinds of searches: one fairly simple and the other more advanced. Both, however, are a cut above the more basic search routines because the recipe functions allow the user to search for multiple keywords. In addition to the two search pages, this application includes a powerful results page where the real search power is coded. The results page utilizes Dreamweaver's application objects for recordset navigation and provides links to a corresponding detail page.

graphics/126fig01.gif

From the detail page, users can choose to update their records; this functionality can easily be limited to an administrator. Two interconnected administrative pages New Job and New Employee round out the application. Several of the pages use sophisticated SQL techniques including run-time WHERE clauses and nested SQL statements to display meaningful results to the user's search criteria.



Macromedia Dreamweaver MX 2004 Web Application Recipes
Macromedia Dreamweaver MX 2004 Web Application Recipes
ISBN: 0735713200
EAN: 2147483647
Year: 2003
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net