Hi,
I''m new to all this so if this is a daft question sorry.
I''m using Ajax Autocomplete to populate a search box with likely
matches.
These results need to be filtered by an option from a select box that
is alongside the search box.
As the current Autocomplete function only takes in one id to post to
the search file, i figured i could post more stuff to the
Ajax.Autocompleter functions using the url iteself. So every time the
select box is changed I''m recreating the Ajax.Autocompleter Object by
using the select boxes onChange, and calliing the following:
function setSelected() {
new
Ajax.Autocompleter("autocomplete",auto_complete","ajax.fetch.php?search_by="+escape(document.getElementById(''search_by'').options[document.getElementById(''search_by'').selectedIndex].value),
{});
}
Where "search_by" is the selected value of the select box.
This does work in a fashion but i need to be able to destroy any
existing Autocomplete Objects before I create a new one, as they
persist in the background when I change the select box, so I have
multipul Objects trying to populate my list of possible matches, using
different "search_by" values.
Hmm does this make sense to anyone ?, is there a different way to do this.
Cheers for any help.
Louis