
Would you like a search window to the Harris Cyclery site on one of your Web pages? It would look and work just like this:
If so, just copy and paste the following HTML code shown in red into your page:
<script language="JavaScript">
<!--
var search_htm_url = "http://www.sheldonbrown.com/search.html";
function searchPage() {
if ((document.searchpage.keyword.value.length == 0)
|| (document.searchpage.keyword.value == " ")) {
alert("First you must enter a keyword to search for.");
} else {
sel = document.searchpage.and_or.selectedIndex;
location.href = search_htm_url + "?"
+ escape(document.searchpage.keyword.value)
+ (sel==0?"&and":(sel==2?"&exact":"&or"));
}
return false;
}
document.write('<form name="searchpage" onSubmit="return searchPage()">'
+'Search the Sheldon Brown/Harris Cyclery site: <input type="text" size=15 name="keyword"> '
+'<input type="button" value="Search" onClick="searchPage()">'
+'<select name="and_or" size=1><option>find all<option>find any'
+'<option>exact</select></form>');
// -->
</script>
Or, if you prefer, a search window for just Sheldon Brown's Bicycle Glossary:
<script language="JavaScript">
<!--
var search_htm_url = "http://www.sheldonbrown.com/gloss-search.html";
function searchPage() {
if ((document.searchpage.keyword.value.length == 0)
|| (document.searchpage.keyword.value == " ")) {
alert("First you must enter a keyword to search for.");
} else {
sel = document.searchpage.and_or.selectedIndex;
location.href = search_htm_url + "?"
+ escape(document.searchpage.keyword.value)
+ (sel==0?"&and":(sel==2?"&exact":"&or"));
}
return false;
}
document.write('<form name="searchpage" onSubmit="return searchPage()">'
+'Search the Sheldon Brown Bicycle Glossary: <input type="text" size=15 name="keyword"> '
+'<input type="button" value="Search" onClick="searchPage()">'
+'<select name="and_or" size=1><option>find all<option>find any'
+'<option>exact</select></form>');
// -->
</script>
If you do put one of these links on your site, I'd appreciate it if you'd drop me an email to let me know.
Search engine script provided by Infohiway
Visitor #
since June 15, 1999
Updated Tuesday, June 15, 1999 5:20 PM
If you would like to make a link or bookmark to this page, the URL is:
http://www.sheldonbrown.com/search-html.html