I have a text box that connects using jQuery UI 1.8.4 autocomplete. I have a select event that was hooked up, so when the user selects an item from the list, it calls another javascript function that issues an ajax request to save the data and update the XML document.
There is an onBlur event in the same text field, so if the user manually enters the data and places it in the text field without selecting the autocomplete element, it also performs an update.
When the user selects an item from the autocomplete list, he calls onBlur to fire, which cancels the select event, so the only data that is updated is all that is in the text field that the user typed, and since the select event does not fire the contents of the text field do not updated.
I tried to use the change event with the same results.
Is there a way to guarantee that the select event will be fired, as well as implement some functions that will emulate onBlur when the user enters a value instead?
Thank.
source
share