asp.net mvc 2 - jQuery autocomplete fires multiple times -


Then I have a jquery autocomplete on a testbox that searches the database for a user, and hides the ID in the input Keeps in the field. For some reasons when they type something, when the autocomplete is completed, again when an item is selected, the text changes because I am searching for the first time and last name so it is not getting a match for the second time and my field Pulls out

I have kept it working on a separate page, but it only searches for one field, so when it returns a value it remains, it still searches for two areas, so It does not return anything to search for the second time. I believe the problem is there, but I do not know how to fix it.

  $ ("# formSubscriberName"). Autocomplete ('/ customer / search', {autoFill: false, (data, index, max) {return data [1];}, formatmatch: function (data, index, max) {return data [1];} (Data, result, data, index, maximum) {return data [1];}}) results (function (event, data, formatted) {if (data) {true} Val (Data [0] ($ "'), $ (" #FormsSubbsBeber "). Val (data [1]);} and {$ (" # SubscriberIDID "). Val (' & Lt;% = Guid.Empty & gt; ');}}); & lt; Input Id = "FormSubSubberName" name = "FormSubSubberName" style = "width: 250px;" type = "text" value = ""> Input ID = "SubscriberID" name = "SubscriberID" type = "hidden" value = ">  

I recently found something strange with autocomplete Behavior faced. My problem was solved when I removed "Use Match" which has gone from the jQuery UI auto-complete. Removing that option is worth a try


Comments