Explanation of search-examples.html

This is an explanation of the search-examples.html file that is created when you ask for instructions when running index. For each section the browser output will be listed followed by the HTML source (with explanation).

This is not an HTML forms tutorial (nor was it meant to be), for more information about HTML forms take a look at:
Carlos' FORMS Tutorial or NCSA's Fill-Out Form Support Pages


(Note: In the examples below "xxxxx" stands for your login ID)

Sections in search-examples.html:
  1. Search using all options
  2. Plain Search
  3. Plain Search w/custom header & footer on search results
    Custom Headers and Footers, very useful!
  4. Preformatted search for "davis"
  5. Preformatted search for "davis" using a button

Search Examples

Search using all options

Enter keyword(s):

Match no more than documents.

Search everything
Search title
Search headers (H1 ... H6)
Search body
Search emphasis tags (strong, i, b, em)
Search comments


<form method="POST" action="http://www.dcn.davis.ca.us/search/go/xxxxx/xxxxx.index">
Beginning of the form: action corresponds to the URL of our server, followed by search + "/", followed by go + "/", followed by your login ID (xxxxx) + "/", followed by the name of the index file (xxxxx.index). (required)

Enter keyword(s): <input type="text" name="search" value="" size=20>
This is the field where the user's search string(s) are stored. (required)

<input type=submit value=" Search "> <input type=reset value=" Reset "><p>
The form submit and reset buttons. (reset is optional)

Match no more than <input name="maxresults" value=40 size=4> documents.<p>
Limits the number of results returned. If no value is entered, it defaults to 40. (optional)

<input name="all" type="checkbox" checked> Search everything<br>
Looks for keyword(s) in all parts of documents. If nothing is entered, this is the default. (optional)

<input name="title" type="checkbox"> Search title<br>
Looks for keyword(s) between <title> and </title>. (optional)

<input name="headers" type="checkbox"> Search headers (H1 ... H6)<br>
Looks for keyword(s) between HTML Headers - <Hx> and </Hx>. (optional)

<input name="body" type="checkbox"> Search body<br>
Looks for keyword(s) between <body> and </body>. This doesn't work properly if you place other options within the body tag (e.g. background, bgcolor, etc.). (optional)

<input name="em" type="checkbox"> Search emphasis tags (strong, i, b, em)<br>
Looks for keyword(s) between HTML emphasis tags (strong, i, b, em). (optional)

<input name="comments" type="checkbox"> Search comments<br>
Looks for keyword(s) between comment tags, <!-- and -->. (optional)

</form>
Close HTML form. (required)

Plain Search

Enter keyword(s):

<form method="POST" action="http://www.dcn.davis.ca.us/search/go/xxxxx/xxxxx.index">
Beginning of the form: action coresponds to the URL of our server, followed by search + "/", followed by go + "/", followed by your login ID (xxxxx) + "/", followed by the name of the index file (xxxxx.index). (required)

Enter keyword(s): <input type="text" name="search" value="" size=30>
This is the field where the user's search string(s) are stored. (required)

<input type=submit value=" Search ">
The form submit button.

</form>
Close HTML form. (required)

Plain Search w/custom
header & footer on search results

Enter keyword(s):

<form method="POST" action="http://www.dcn.davis.ca.us/search/go/xxxxx/xxxxx.index">
Beginning of the form: action coresponds to the URL of our server, followed by search + "/", followed by go + "/", followed by your login ID (xxxxx) + "/", followed by the name of the index file (xxxxx.index). (required)

Enter keyword(s): <input type="text" name="search" value="" size=30>
This is the field where the user's search string(s) are stored. (required)

<input type="hidden" name="header" value="sample-header.xhtml">
Replace the default search engine header with your own. This file must end in .xhtml. If the .xhtml file is in the same directory as the index file, only the file name is needed. If the file is located elsewhere, the full UNIX path is required (e.g. /home/wheel/public_html/header.xhtml). (optional)

<input type="hidden" name="footer" value="sample-footer.xhtml">
Replace the default search engine footer with your own. This file must end in .xhtml. If the .xhtml file is in the same directory as the index file, only the file name is needed. If the file is located elsewhere, the full UNIX path is required (e.g. /home/wheel/public_html/footer.xhtml). (optional)

<input type=submit value=" Search ">
The form submit button.

</form>
Close HTML form. (required)

Preformatted search for "davis"

Search or "davis"
<a href="http://www.dcn.davis.ca.us/search/go/xxxxx/xxxxx.index?search=davis">Search or "davis"</a>
Searches can also be placed in links. Place the normal form action URL in a link followed by a question mark, followed by the appropriate search parameters.

Preformatted search for "davis" using button


<form method="POST" action="http://www.dcn.davis.ca.us/search/go/xxxxx/xxxxx.index">
Beginning of the form: action coresponds to the URL of our server, followed by search + "/", followed by go + "/", followed by your login ID (xxxxx) + "/", followed by the name of the index file (xxxxx.index). (required)

<input type="hidden" name="search" value="davis">
This is the field where the search string(s) are stored. (required)

<input type=submit value="Search for 'davis'">
The form submit button.

</form>
Close HTML form. (required)

Back to Main DCN "Personal" Search Engine Instruction Page