'Advanced Search' form for department websites
Page contents > 'Advanced Search' example | Configuring the search form
'Advanced Search' example
This is a more advanced version of the first search form and enables users to further restrict the results of their submission.
The process of getting the form into your web page is:
- To insert this search form into one of your web pages, first open FrontPage and create a search page.
- Next, copy the HTML at the end of this section and then in FrontPage
- In FrontPage, position the cursor at the point you want the form to appear on you page. Select from the main toolbar 'Edit', 'Paste Special'.
- When the 'Paste Special' window appears, select the last option 'Treat as HTML' - this means rather than simply pasting the text the copied, FrontPage will insert the copied text in the HTML of your search page.
- Now you need to configure the search form for your department.
Configuring the search form
Configuring this search form is more slightly more complex but straightforward.
- Once you have copied the text into FrontPage, ensure that you are in the Normal view and click with the right mouse button the field that contains the text 'Your Department'. From the menu of options that appears once you have done this, select 'Form Field Properties' - this will most likely be the last item.
- From the properties window that now appears you need to chose 'Your Department' and click on the 'Modify' button.
- From the Modify window, you should change 'Your Department' to the appropriate text - this is what appears in the drop-down list of options on the web page.
IMPORTANT: If you are using a version of FrontPage 2000 earlier than the SR-1 release please refer to FrontPage 2000 Frequently asked questions (FAQs) - this page also explains how to determine which version you have.
- You should also change the Value from 'http://www.lse.ac.uk/collections/your-department-here/' to the URL of your homepage-
e.g. http://www.lse.ac.uk/collections/government/
It is important that the URL of your department is exactly as appears on the web server as the search engine is case-sensitive.
The best advice is to copy the URL from the browser.
- For, example, the Law department URL is http://www.lse.ac.uk/collections/law/ and not
http://www.lse.ac.uk/collections/LAW/ or http://www.lse.ac.uk/collections/Law/
This value is what is sent to the search engine.
- Click on 'OK' to make the changes.
- Also on the list of Choices on the first properties window is a choice named 'A department sub-directory'. This is included in case you have a set of web pages within a folder on your FrontPage web which you want people to be able to search independently of all the others which are located in other directories. An example would be a folder in which you are storing web pages for a specific publication.
If you do not have such a folder and consequently don't want to provide this search option, you should highlight the choice and select 'Remove'.
- If you do want to use the ability to search a sub-folder, you need to repeat the modification process outlined above for the department values - click on 'Modify' and then make the necessary changes to the both the text which will appear on the web page and the value which is sent to the search engine, replacing the initial values of 'A department sub-directory' and 'http://www.lse.ac.uk/collections/your-department-here/a-sub-directory-here/'.
AGAIN, THE SEARCH ENGINE IS CASE-SENSITIVE SO COPY THE EXACT URL OF YOUR SUB-DIRECTORY FROM THE BROWSER.
- To add a new directory or sub-directory, click on the 'Add' button and insert the new values.
COPY THE HTML BENEATH FOR THE ADVANCED SEARCH FORM
<table border="1" width="415" cellspacing="0" cellpadding="5" bgcolor="#FFFFCC">
<tr>
<td width="435"><form method="POST" action="http://www.lse.ac.uk/cgi-bin/htsearch">
<input type="hidden" name="config" value="htdig"><input type="hidden" name="exclude" value="exclude"><p><font
size="4">Advanced Search:</font></p>
<table border="0" width="400" cellspacing="0" cellpadding="0">
<tr>
<td align="left" colspan="3"><input type="text" size="33" name="words"> <input
type="submit" value="Search"><p> </td>
</tr>
<tr>
<td align="right"><strong>Limit results to:</strong></td>
<td></td>
<td><select name="restrict" size="1">
<option selected value="http://www.lse.ac.uk/collections/your-department-here/">Your Department</option>
<option value="http://www.lse.ac.uk/collections/your-department-here/a-sub-directory-here/">A Department sub-directory</option>
<option value="No Limit ">No Limit</option>
</select></td>
</tr>
<tr>
<td align="right">Match:</td>
<td></td>
<td><select name="method" size="1">
<option value="and">All Words</option>
<option value="or">Any Word</option>
<option value="boolean">Advanced </option>
</select></td>
</tr>
<tr>
<td align="right">List Format:</td>
<td> </td>
<td><select name="format" size="1">
<option value="builtin-long">Long </option>
<option value="builtin-short">Short </option>
</select></td>
</tr>
<tr>
<td align="right">Sort by:</td>
<td> </td>
<td><select name="sort" size="1">
<option value="score">Score </option>
<option value="time">Time </option>
<option value="title">Title </option>
<option value="revscore">Reverse Score </option>
<option value="revtime">Reverse Time </option>
<option value="revtitle">Reverse Title </option>
</select></td>
</tr>
</table>
<p> </p>
</form>
</td>
</tr>
</table>
^ Back to top