Here's some JS code that runs an AJAX autocomplete menu. It uses mootools for its AJAX calls (v1.2 required). This is what we use on beeets.com for searching tags.
This code sends an AJAX request to whatever URL is specified during initialization, and puts the response (should normally be a <ul><li> list) into a div right under the input box. Example CSS and HTML is included.