Implementation/Code
Several types of search box are present at Northwestern. The one you'll want to use will depend on your needs.
Example HTML
Example HTML follows. For additional parameters/tags that can be used to further customize the output, please see additional parameters.
Northwestern Search
This code will search all of Northwestern
<form action="http://googlesearch.northwestern.edu/search" method="get">
<input type="text" name="q" id="q" />
<input type="hidden" name="site" value="default_collection" />
<input type="hidden" name="client" value="default_frontend" />
<input type="hidden" name="output" value="xml_no_dtd" />
<input type="hidden" name="proxystylesheet" value="default_frontend" />
<input type="submit" name="Search" value="Search" />
</form>
Note that there is no trailing slash on the sitesearch URL. This is important.
Search Within Site
Example: Office of the President
<form action="http://googlesearch.northwestern.edu/search" method="get">
<input type="text" name="q" id="q" />
<input type="hidden" name="sitesearch" value="http://www.northwestern.edu/president" />
<input type="hidden" name="site" value="default_collection" />
<input type="hidden" name="client" value="default_frontend" />
<input type="hidden" name="output" value="xml_no_dtd" />
<input type="hidden" name="proxystylesheet" value="default_frontend" />
<input type="submit" name="Search" value="Search" />
</form>
Note that there is no trailing slash on the sitesearch URL. This is important.
Combined Search
Example: Study Abroad Office
<form action="http://googlesearch.northwestern.edu/search" method="get">
<fieldset>
<input type="text" alt="search" id="q" name="q"/>
<input type="submit" name="Search" value="Search" /><br/>
<input type="radio" name="sitesearch" id="sitesearch" value="http://www.northwestern.edu/studyabroad" checked="checked" />
<label for="sitesearch">Study Abroad Office</label>
<input type="radio" id="northwesternsearch" name="sitesearch" value="" />
<label for="northwesternsearch">Northwestern</label><br/>
<input type="hidden" name="site" value="default_collection" />
<input type="hidden" name="client" value="default_frontend" />
<input type="hidden" name="output" value="xml_no_dtd" />
<input type="hidden" name="proxystylesheet" value="default_frontend" />
</fieldset>
</form>
Additional Parameters
There are a few other parameters that you may find useful. A full list of search parameters is detailed on the Google.com
Client
The client parameter defines a set of various rules and guidelines for display of results. In our case specifically, the most significant difference between the two clients currently available is the presence or absence of onebox results.
Client: default_frontend
The default client is used includes only the people search module.
<form action="http://googlesearch.northwestern.edu/search" method="get">
<input type="text" name="q" id="q" />
<input type="hidden" name="sitesearch" value="http://www.northwestern.edu/president" />
<input type="hidden" name="site" value="default_collection" />
<input type="hidden" name="client" value="default_frontend" />
<input type="hidden" name="output" value="xml_no_dtd" />
<input type="hidden" name="proxystylesheet" value="default_frontend" />
<input type="submit" name="Search" value="Search" />
</form>
Client: default_oneboxes
The default_oneboxes client includes onebox modules for various other kinds of searches (currently people, office directory, and course descriptions).
<form action="http://googlesearch.northwestern.edu/search" method="get">
<input type="text" name="q" id="q" />
<input type="hidden" name="sitesearch" value="http://www.northwestern.edu/president" />
<input type="hidden" name="site" value="default_collection" />
<input type="hidden" name="client" value="default_oneboxes" />
<input type="hidden" name="output" value="xml_no_dtd" />
<input type="hidden" name="proxystylesheet" value="default_oneboxes" />
<input type="submit" name="Search" value="Search" />
</form>

