I posted this query in the javascript forum but someone suggested I might find more help here.
I've built an autocomplete text field using scriptaculous/prototype and have added an afterUpdateElement option to it so that the form submits when a user selects an option from the autocomplete list. This worked fine until I added a standard submit button to the form as well. Now, the submit button works, but the afterUpdateElement doesn't.
Any ideas?
ps. if this is more a javascript problem then I apologise!
function buildAutocompleter()
{
new Ajax.Autocompleter(
'ds',
'autoCompleteMenu',
'#', //this points to the php include that generates the list
{
minChars: 2,
frequency: 0.5,
afterUpdateElement: function() { document.destSearch.submit(); }
}
);
}
Event.observe(window, "load", buildAutocompleter);
Bookmarks