| home / web / dev / dndcgi |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
|
|
By now you've done all the hard work. To use the script in your pages, you simply call the form script with a hyperlink like this:
<A HREF="cgi-bin/ice-form.cgi">Search this site</A>
The ice-form.cgi script generates both the search request form and the search results page. You can also use ``canned'' searches that don't present a search form. For example, to search for all recently changed documents, you could have a link such as
<A HREF="cgi-bin/ice-form.cgi?DAYS=7">What's new this week</A>
or
<A HREF="cgi-bin/ice-form.cgi?DAYS=30&KEYWORDS=Game+and+Review:">
This Month's Game Reviews</A>
Take a look at the default search form using the View Source function of your browser. You'll be able to see the form element names and use them in your preset queries.
The ICE script presents the request form if it is called with no form data. If either GET or POST style form data is passed to the script, it parses the fields and uses the values for a search, presenting the results on the results page. The script can’t tell if the form data came from an actual form or from a “canned” CGI call, as described previously.
One limitation of the ICE system is that it doesn't give any context for the search results. That is, it just links you to a page. Your search term could be anywhere in a potentially very long document. This is often irritating when substring matching is used (when parts of longer words the user wasn't searching for are matched). The user may look through the page for a long time, only to discover the match was within some completely unrelated word.
At the time of this writing, we have a prototype modification to ICE that highlights the search words in the returned document, thus making them easy to pick out. Unfortunately, we didn't have time to test the modifications sufficiently to include them in this book (a good reason to buy the second edition, we think). Check the book's Web site (http://www.hypertising.com/DnDCGI/) periodically to see if we've finished this modification, as well as other enhancements to ICE.
Those of you who are happy with the default results page and who don't need a -thesaurus can safely stop here and move on to another script. Those who want to modify the output page or create a thesaurus file should continue reading.
Comments are welcome
Copyright © 1997 Addison-Wesley Pub Co. and
| ||||||||||||||||||||
Created: Oct. 24, 1997
Revised: Oct. 27, 1997
URL: http://webreference.com/dev/dndcgi/using.html