[WEB4LIB] Seemingly simple web FORM help request
David Jones
DJones at scu.edu
Wed Feb 13 19:29:43 EST 2002
>>> "RICHARD EDWARDS" <REDWARDS at statelib.wa.gov> 02/13/02 01:17PM >>>
It breaks down at the "&" between the input values. What I need there is a "+" so the URL reads:
http://cals.evergreen.edu/search~s2/d?SEARCH=Milton+%28WASH%29+--+Newspapers=
<<<
Richard,
The ampersand shows up because that is the way that html forms work. All input value pairs are separated by an ampersand. There is no built-in way to get rid of those. Also, drop the punctuation marks from the search. The innopac is searching the index not the record and the punctuation doesn't make it into the index.
You could always put in the init value of " wash newspapers" and have the form say "add your town to the beginning, do not delete the wash newspapers!":
<form action="http://cals.evergreen.edu/search~s2/d?" method=get>
<input align="center" maxlength="72" name="SEARCH" size="50" value=" wash newspapers">
<input type=submit value="Search" name="submit">
</form>
There are a couple of other things that you could do:
1) Have the search form on another server that has a script that reconstructs the URI prior to sending it to the innopac.
2) Have lists of available towns that point at preconstructed URIs that search the innopac. This would require either an external script or javascript to process. You would also have to maintain the list if you added towns in the future.
3) Use a form that submits a false limit to the innopac to produce a URI similar to:
http://cals.evergreen.edu/search/wwash+newspapers/wwash+newspapers/1,10000,10000,E/limit?NAME=S&VALUE=milton
A form that could create this:
<form action="http://cals.evergreen.edu/search/wwash+newspapers/wwash+newspapers/1,10000,10000,E/limit?" method=get>
<input type="hidden" name="NAME" value="S">
<input align="center" maxlength="64" name="VALUE" size="50">
<input type="submit" value="Search" name="submit">
</form>
This will not work if you add more than 10000 records with the"wash newspapers" subheading. Can't see that happening, though, and by then, I'm sure we'll all be running a new version of the innopac search engine...
It's also a little slow, but heah, it works...
HTH,
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
David Jones
Library Systems Manager III
Orradre Library
mailto:djones at scu.edu
phone: 408-551-7167
fax: 408-551-1805
http://www.scu.edu/library/
Santa Clara University
500 El Camino Real
Santa Clara CA 95053-0500 "Insert pithy quote here"
More information about the Web4lib
mailing list