Using jquery Autocomplete with fields that have a change selector [duplicate]val() doesn't trigger change() in jQueryHow do you disable browser Autocomplete on web form field / input tag?Is there an “exists” function for jQuery?Add table row in jQueryHow do I check if an element is hidden in jQuery?How to get the children of the $(this) selector?Setting “checked” for a checkbox with jQuery?How to check whether a checkbox is checked in jQuery?jQuery scroll to element“Thinking in AngularJS” if I have a jQuery background?Disabling Chrome Autofill

I have a domain, static IP and many devices I'd like to access outside my house. How to route them?

Why was Quirrell said to be in the Black Forest if Voldemort was actually in Albania?

Can the caster of Time Stop still use their bonus action or reaction?

Function pointer parameter without asterisk

What kind of vegetable has pink and white concentric rings?

Does observational data need further proof?

Is there a smart way to pick up Page Design other than Template to Design mapping?

Are there foods that astronauts are explicitly never allowed to eat?

Is there an English word to describe when a sound "protrudes"?

Conjugacy classes in virtually nilpotent groups

Can "Taking algebraic closure" be made into a functor?

1025th term of the given sequence.

Why do we need an estimator to be consistent?

What is the metal bit in the front of this propeller spinner?

How to check if all my faces on mesh are all quads using a script

Longest to Shortest tractates of Yerushalmi by daf

Can I use Sitecore's Configuration patching mechanics for my Identity Server configuration?

Why didn't NASA launch communications relay satellites for the Apollo missions?

Do I have to mention my main character's age?

Why do the top heroes in Boku no Hero Academia only come from Japan?

Why does airflow separate from the wing during stall?

My current job follows "worst practices". How can I talk about my experience in an interview without giving off red flags?

What is the right way to verify an off-chain transaction with golang?

Can a creature sustain itself by eating its own severed body parts?



Using jquery Autocomplete with fields that have a change selector [duplicate]


val() doesn't trigger change() in jQueryHow do you disable browser Autocomplete on web form field / input tag?Is there an “exists” function for jQuery?Add table row in jQueryHow do I check if an element is hidden in jQuery?How to get the children of the $(this) selector?Setting “checked” for a checkbox with jQuery?How to check whether a checkbox is checked in jQuery?jQuery scroll to element“Thinking in AngularJS” if I have a jQuery background?Disabling Chrome Autofill






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1
















This question already has an answer here:



  • val() doesn't trigger change() in jQuery

    9 answers



I have a handful of fields:



 <input type='text' id='field1' name='field1' class='checkMe'>
<input type='text' id='field2' name='field2' class='checkMe'>
<input type='text' id='field3' name='field3' class='checkMe'>


I have a jquery autocomplete function:



 $('#someField').autocomplete(
/// options
$.ajax(
////
success:function(result)
$.each(result,function(e,i)
$('#'e).val(i);
// -- e is a valid id of a text field

);

);
);


the autocomplete part works fine. I also have another event listener for those fields:



 $('.checkMe').bind('keyup change', function () 
alert('hi');
//do something
);


Users on this page can either fill out form by entering values in each field, or selecting a field somewhere else and let autocomplete fill out form.



Problem: When user enters data manually, .checkMe fires correctly, When user uses autocomplete, the .checkMe event never fires.










share|improve this question













marked as duplicate by Kaddath, Community♦ Mar 26 at 13:37


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 2





    you need to trigger yourself, val does not, see here

    – Kaddath
    Mar 26 at 13:01

















1
















This question already has an answer here:



  • val() doesn't trigger change() in jQuery

    9 answers



I have a handful of fields:



 <input type='text' id='field1' name='field1' class='checkMe'>
<input type='text' id='field2' name='field2' class='checkMe'>
<input type='text' id='field3' name='field3' class='checkMe'>


I have a jquery autocomplete function:



 $('#someField').autocomplete(
/// options
$.ajax(
////
success:function(result)
$.each(result,function(e,i)
$('#'e).val(i);
// -- e is a valid id of a text field

);

);
);


the autocomplete part works fine. I also have another event listener for those fields:



 $('.checkMe').bind('keyup change', function () 
alert('hi');
//do something
);


Users on this page can either fill out form by entering values in each field, or selecting a field somewhere else and let autocomplete fill out form.



Problem: When user enters data manually, .checkMe fires correctly, When user uses autocomplete, the .checkMe event never fires.










share|improve this question













marked as duplicate by Kaddath, Community♦ Mar 26 at 13:37


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 2





    you need to trigger yourself, val does not, see here

    – Kaddath
    Mar 26 at 13:01













1












1








1









This question already has an answer here:



  • val() doesn't trigger change() in jQuery

    9 answers



I have a handful of fields:



 <input type='text' id='field1' name='field1' class='checkMe'>
<input type='text' id='field2' name='field2' class='checkMe'>
<input type='text' id='field3' name='field3' class='checkMe'>


I have a jquery autocomplete function:



 $('#someField').autocomplete(
/// options
$.ajax(
////
success:function(result)
$.each(result,function(e,i)
$('#'e).val(i);
// -- e is a valid id of a text field

);

);
);


the autocomplete part works fine. I also have another event listener for those fields:



 $('.checkMe').bind('keyup change', function () 
alert('hi');
//do something
);


Users on this page can either fill out form by entering values in each field, or selecting a field somewhere else and let autocomplete fill out form.



Problem: When user enters data manually, .checkMe fires correctly, When user uses autocomplete, the .checkMe event never fires.










share|improve this question















This question already has an answer here:



  • val() doesn't trigger change() in jQuery

    9 answers



I have a handful of fields:



 <input type='text' id='field1' name='field1' class='checkMe'>
<input type='text' id='field2' name='field2' class='checkMe'>
<input type='text' id='field3' name='field3' class='checkMe'>


I have a jquery autocomplete function:



 $('#someField').autocomplete(
/// options
$.ajax(
////
success:function(result)
$.each(result,function(e,i)
$('#'e).val(i);
// -- e is a valid id of a text field

);

);
);


the autocomplete part works fine. I also have another event listener for those fields:



 $('.checkMe').bind('keyup change', function () 
alert('hi');
//do something
);


Users on this page can either fill out form by entering values in each field, or selecting a field somewhere else and let autocomplete fill out form.



Problem: When user enters data manually, .checkMe fires correctly, When user uses autocomplete, the .checkMe event never fires.





This question already has an answer here:



  • val() doesn't trigger change() in jQuery

    9 answers







jquery autocomplete






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 12:56









bart2puckbart2puck

1,5832 gold badges16 silver badges35 bronze badges




1,5832 gold badges16 silver badges35 bronze badges




marked as duplicate by Kaddath, Community♦ Mar 26 at 13:37


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Kaddath, Community♦ Mar 26 at 13:37


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 2





    you need to trigger yourself, val does not, see here

    – Kaddath
    Mar 26 at 13:01












  • 2





    you need to trigger yourself, val does not, see here

    – Kaddath
    Mar 26 at 13:01







2




2





you need to trigger yourself, val does not, see here

– Kaddath
Mar 26 at 13:01





you need to trigger yourself, val does not, see here

– Kaddath
Mar 26 at 13:01












1 Answer
1






active

oldest

votes


















0














as seen in val-doesnt-trigger-change-in-jquery



The solution was to add:



 $('#'e).val(i).trigger("change");


in my autocomplete.






share|improve this answer


























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    as seen in val-doesnt-trigger-change-in-jquery



    The solution was to add:



     $('#'e).val(i).trigger("change");


    in my autocomplete.






    share|improve this answer



























      0














      as seen in val-doesnt-trigger-change-in-jquery



      The solution was to add:



       $('#'e).val(i).trigger("change");


      in my autocomplete.






      share|improve this answer

























        0












        0








        0







        as seen in val-doesnt-trigger-change-in-jquery



        The solution was to add:



         $('#'e).val(i).trigger("change");


        in my autocomplete.






        share|improve this answer













        as seen in val-doesnt-trigger-change-in-jquery



        The solution was to add:



         $('#'e).val(i).trigger("change");


        in my autocomplete.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 26 at 13:36









        bart2puckbart2puck

        1,5832 gold badges16 silver badges35 bronze badges




        1,5832 gold badges16 silver badges35 bronze badges


















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.





            Popular posts from this blog

            How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

            Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?