sorry, i'm a bit of a n00b with JQuery. would that be added onto my current autocomplete call?
my is my code now: $().ready(function() { $("#SearchTxt").autocomplete("AjaxSearch.php", { width: 190, onItemSelect: SubmitSearchForm, selectFirst: false }); }); so I would add it on like: $().ready(function() { $("#SearchTxt").autocomplete("AjaxSearch.php", { width: 190, onItemSelect: SubmitSearchForm, selectFirst: false }).result(fn); }); then where 'fn' is, I could add in a function to check that the field has a value and submit it? or would that be an additional call? On Nov 14, 2:46 pm, ajpiano <[EMAIL PROTECTED]> wrote: > there is a result callback that is fired after you choose an element > in the AC list. bind to that and carry on your form submit... > > $(...).autocomplete(options).result(fn); > > --adam > > On Nov 14, 12:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > hello! > > I'm using the JQuery auto complete ( jquery.autocomplete.js ). > > and I'm wondering how can I submit a form once an item has been > > selected? > > currently when an item is select you have to hit enter twice, once to > > get the item into the search field, and once to submit the search. I'd > > like to submit the search on the first enter. > > > I see the option for : onItemSelect > > how can I use this to submit the form? > > > thanks inadvance for your time! > > -Ken- Hide quoted text - > > - Show quoted text -