Adding the htdig search engine to your web pages

Simple Search

Match: Format:

Search Words:

The simplest method of using htdig is just to let it search the entire database.  Just drop the following code in your web page.

Tip: If you want to try this on your local pc, put in the entire path to the URL :
ACTION="http://www.library.yale.edu/cgi-bin/htsearch"
You should change it back when you load your page on the server.


<FORM METHOD="GET" ACTION="/cgi-bin/htsearch">

Match:
<SELECT NAME=method>
<OPTION VALUE=and>All
<OPTION VALUE=or>Any
<OPTION VALUE=boolean>Boolean
</SELECT>

Format:
<SELECT NAME=format>
<OPTION VALUE=builtin-long>Long
<OPTION VALUE=builtin-short>Short
</SELECT>
<INPUT TYPE=hidden name=config VALUE=htdig>
<BR>
<INPUT TYPE=hidden name=exclude VALUE="">
<BR>

Search Words:
<INPUT TYPE="text" size="30" name="words" VALUE="">
<INPUT TYPE="submit" VALUE="Search">
<P>
</FORM>


Complex Example (not that complex!)

This is a more complex example which allows you to restrict searches to a particular directory selected by a drop-down menu.  You can just copy the code and change the values for your own searches.  

The VALUE="http://url.here./" part of the following snippet  from the <SELECT name=restrict> section controls the search.  You can put anything you want as a label after the >.  I just put the URL for mine, but you could put something more descriptive like "Library Research Workstation," etc.
<SELECT name=restrict>
...
<OPTION VALUE="http://www.library.yale.edu/pubstation">www.library.yale.edu/pubstation/
...
</SELECT>


Match: Format:

Restrict by URL
Search:

<FORM METHOD="get" ACTION="/cgi-bin/htsearch">
Match:
<SELECT NAME=method>
<OPTION VALUE=and>All (and)
<OPTION VALUE=or>Any (or)
<OPTION VALUE=boolean>Boolean
</SELECT>
Format:
<SELECT NAME=format>
<OPTION VALUE=builtin-long>Long
<OPTION VALUE=builtin-short>Short
</SELECT>
<INPUT TYPE=hidden NAME=config VALUE=htdig>
<P>
Restrict by URL
<SELECT NAME=restrict>
<OPTION VALUE="">All Indexed URLs (no restriction)
<OPTION VALUE="http://www.library.yale.edu/">www.library.yale.edu/
<OPTION VALUE="http://elsinore.cis.yale.edu/lawweb/">elsinore.cis.yale.edu/lawweb/
<OPTION VALUE="http://www.med.yale.edu/library/">www.med.yale.edu/library/
<OPTION VALUE="http://www.library.yale.edu/pubstation/">www.library.yale.edu/pubstation/
<OPTION VALUE="http://www.library.yale.edu/scilib/">www.library.yale.edu/scilib/
<OPTION VALUE="http://www.library.yale.edu/govdocs/">www.library.yale.edu/govdocs/
<OPTION VALUE="http://www.library.yale.edu/~lso/workstation/">www.library.yale.edu/~lso/workstation/
</SELECT>
<INPUT TYPE=hidden NAME=exclude VALUE=""> <BR>
Search:
<INPUT TYPE="text" size="30" NAME="words" VALUE="">
<INPUT TYPE="submit" VALUE="Search"> <FONT COLOR=red>
</FORM>


Miscellaneous Info and Links to Documentation


Yale University Library Workstation Support Group

Revised 7/16/98
john.coleman@yale.edu