• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

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.

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.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint