Live Search
Description:
Live Search is a Javascript include file that provides a simple way to incorporate AJAX search into your site.
Requirements:
prototype.js
Download:
live_search.js
Usage:
-
Include prototype.js in your page
<script type="text/javascript" src="prototype.js"></script>
-
Include live_search.js in your page
<script type="text/javascript" src="live_search.js"></script>
-
Include the following code iside the <head> tag
<script type="text/javascript"> var search = new LiveSearch($('search_box'), $('search_results')); </script> -
Cleate a normal HTML form. The action should be the URL of the search results you want pulled into the results box. A submit button is not necessary.
<form action="live_search_results.html" method="post"> <input id="search_box" type="text" name="search" value="Search..." /> <div id="search_results"></div> </form>
Example:
Bryan.edu (sidebar search)