Click here to Skip to main content
15,894,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all. I have a problem with the jquery autocomplete ui. When i type something in the autocomplete textbox i load data into a table. When the user selects an option from the autocomplete list the data in the table should change, however this is only working when i use the keyboard to select an option not when i click on the option with the mouse. I have read some articles on the problem but can't understand them as i am a beginner when it comes to jquery. Any help will be much appreciated, thanking you in advance.

$(function () {

                    $("#tags").autocomplete({
                        source: returned_arr
                    });
                });
Posted
Updated 2-Jul-13 2:09am
v2
Comments
ZurdoDev 2-Jul-13 7:59am    
You need to click the improve question link and post relevant code.
Sampath Lokuge 2-Jul-13 11:06am    
@Ruwaldo could you put the articles urls which you have read but unable to understand ?
Ruwaldo 3-Jul-13 1:59am    
I have looked at a few, and these seem the most simple(link1 link2). I tried using both of them but couldn't get it to work. I am a novice when it comes to jquery.

1 solution

Got the answer to the question from a friend. Just use a timer to execute the function you want to execute when you select an option from the auto-select.

$(".ui-autocomplete").attr("onmouseup", 'setTimeout(function(){load_engagements(current_sort,current_is_asc)},200);');
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900