Brian T. Johnstone

my little space here on the web

Creating a catalog quick search box

1 Comment

Here’s a Systems Librarian 101 tutorial.
One of the first nifty widgets I created for our library web site was a catalog search box.  Most ILS (we’re on SirsiDynix Unicorn/Symphony) systems allow for this sort of thing.  The technology has been around for a while, but so often I am asked how this is achieved.  So let me show you how.
My form is a simple web form – used by many librarians – I’ve also seen some nifty Javascript forms. The basic format is to create a form that will “post” a query to your catalog.  Knowing the particular link for your catalog is essential to a successful search.  In our case, I’m pointing to a generic web user account for the main campus library < http://sunbc3.bucks.edu/uhtbin/cgisirsi/x/0/0/57/5&gt;.  SirsiDynix documentation explains the various linkages recognized by the system.  Note the difference from a catalog start page link < http://sunbc3.bucks.edu/uhtbin/cgisirsi/x/x/0/49/&gt;.

Then create a field for input—a simple text field in this case.

I added options for focusing the search; these must mirror the options on your system.  In the example below are many variations on particular fields.

Next I’ve specified sorting options (PBYR for publication year), and the user (our generic web user login).

You can add other options as you see fit for your system.

Below is my form:

<form method=”post” action=”http://sunbc3.bucks.edu/uhtbin/cgisirsi/x/0/0/57/5″&gt;
Find:<input type=”text” name=”searchdata1″ maxlength=”255″ value=”” />
<p>As a:
<select name=”srchfield1″>
<option value=”GENERAL^SUBJECT^GENERAL^^words or phrase”>words or phrase</option>
<option value=”AU^AUTHOR^AUTHORS^Author Processing^author”>author</option>
<option value=”TI^TITLE^SERIES^Title Processing^title”>title</option>
<option value=”SU^SUBJECT^SUBJECTS^^subject”>subject</option>
<option value=”SER^SERIES^SERIES^Title Processing^series”>series</option>
<option value=”PER^PERTITLE^SERIES^Title Processing^periodical title”>periodical title</option>
</select>
<input type=”hidden” name=”sort_by” value=”-PBYR” />
<input type=”hidden” name=”user_id” value=”WEBSERVER” />
<input type=”hidden” name=”password” value=”guest” />
<p>&nbsp;&nbsp; <input type=”submit” name=”submit” value=”Search” />
</form>

I’ve also done this on a III Millennium system, and it’s the same basic idea (with a “get” form and written for the options on this system):

<form target=”_parent” action=”http://your.library.catalog/search/&#8221; method=”get”>
<select name=”searchtype” size=”1″>
<option value=”X”>Keywords</option>
<option value=”t”>Title</option>
<option value=”j”>Journal Title</option>
<option value=”a”>Author </option>
<option value=”d”>Subject</option>
<option value=”c”>Dewey Call Number</option>
<option value=”g”>SuDoc</option>
<option value=”i”>ISSN/ISBN/Music</option>
</select>
<input type=”text” size=”15″ maxlength=”75″ name=”searcharg” />
<input type=”hidden” name=”SORT” value=”D” />
<input name=”search” type=”submit” value=”Search” />
</form>

I hope you find this helpful.  Let me know if you have any questions.

Addendum 6/1/09:  Bill asked, so I’ll put it here too…  The method for making the catalog search box open the resulting catalog page in a new window (so your library or LibGuides page remains) is to add the ‘target’ operator to the <form> tag (such as: target=”_blank”) making the final result look like this:

<form method=”post” action=”http://sunbc3.bucks.edu/uhtbin/cgisirsi/x/0/0/57/5&#8243; target=”_blank”>

Works the same as adding the target operator to an<a> tag for a web link.

Advertisements

One thought on “Creating a catalog quick search box

  1. Pingback: Expanded SirsiDynix Enterprise Search Widget | Brian T. Johnstone

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s