HTML, CSS, JavaScript
Typeahead Source Not Populating on 3rd Character Forward
Gravatar is a globally recognized avatar based on your email address. Typeahead Source Not Populating on 3rd Character Forward
  Craig Tucker
  All
  Aug 20, 2024 @ 04:09am

Hi All, This is a WTF issue... I have an AjaxJson typeahead search box on my home page. It never works on the third character moving forward. If I backspace from 4 to 3 characters it does work. It works on 1, 2, 4, etc...

I can see that the json result set to the source properly, it just does not display, wtf... Am I missing something obvious? Thanks, Craig

ajaxJson("/api/unit/search/" + encodeURIComponent(this.value), null,
    function (result) {
        $inputu.data('typeahead').source = **result**;
    }, null, { method: "GET" });

Gravatar is a globally recognized avatar based on your email address. re: Typeahead Source Not Populating on 3rd Character Forward
  Rick Strahl
  Craig Tucker
  Aug 20, 2024 @ 08:02am

No idea...

Just you most likely 😄

Use console.log to log out the input value and the data received so you can correlate what you're getting.

console.log(inputText, result);

+++ Rick ---

© 1996-2025