[WEB4LIB] Seemingly simple web FORM help request

Chris Gray cpgray at library.uwaterloo.ca
Thu Feb 14 10:58:45 EST 2002


Here's a little JavaScript that will do the trick:

<body onLoad="document.iiisearch.SEARCH.value='';">
<FORM ACTION="http://cals.evergreen.edu/search~s2/d" method="get"
name="iiisearch"
      onSubmit="document.iiisearch.SEARCH.value += ' (WASH) --
Newspapers';return true;">
        <INPUT align="center" maxLength="64" name="SEARCH" size="50">
        <INPUT type="submit" value="Search">
</form>

Chris Gray
Library Systems
University of Waterloo

-----Original Message-----
From: web4lib at webjunction.org [mailto:web4lib at webjunction.org]On
Behalf Of RICHARD EDWARDS
Sent: Wednesday, February 13, 2002 4:11 PM
To: Multiple recipients of list
Subject: [WEB4LIB] Seemingly simple web FORM help request

Greetings,

I am trying to create a web page with a form to search our Innovative
Interfaces, Inc. catalog for a special purpose outside their normal search
pages and I've gotten very close but can't seem to quite get there.

What I'm trying to do is create a subject search where the patron inputs the
first part of the data and the form itself supplies additional data which I
need appended to the patron input and then submitted to the III catalog for
searching.

The current draft looks like this:

<FORM ACTION="http://cals.evergreen.edu/search~s2/d" method=get>
        <font face="Arial, Helvetica, sans-serif">
        <INPUT align=center maxLength=64 name=SEARCH size=50>
                <INPUT TYPE="hidden" NAME="(WASH) -- Newspapers">
        <INPUT type=submit value=Search>

The resulting action, when added to the user input "Milton" creates the URL:
http://cals.evergreen.edu/search~s2/d?SEARCH=Milton&%28WASH%29+--+Newspapers
=
which unfortunately comes very close but not quite what III's catalog is
looking for.

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
=

That URL works perfectly fine.

Any simple way to achieve this?

joyfully,

Rich Edwards
Innovative Coordinator
Washington State Library
Olympia, WA
redwards at statelib.wa.gov
(360)704-7136

"You will be surprised to find how much that has seemed hopelessly
disagreeable possesses either an instructive or an amusing side." Ella
Wheeler Wilcox in "The Heart of the New Thought" 1902.




More information about the Web4lib mailing list