jQuery UI Autocomplete JSON gives error: Uncaught TypeError: Cannot use 'in' operator to search for '62' in

后端 未结 4 1350
梦如初夏
梦如初夏 2020-12-17 21:07

I am having a great deal of trouble getting autocomplete to work on my page. When I enter 2 characters (\"OW\") into my search input, I get the preloader image (see below),

4条回答
  •  感动是毒
    2020-12-17 21:40

    a little help that can be useful:

    if you're using json, it might be that the "json object" isn't parsed, or you've overwritten the variable with others tings (like what I did stupidly recently).

    for the first problem, be sure that your server know "application/json" MIME type, else use header (for PHP)

    I mean, in PHP, use this before all:

    header("Content-type: application/json");
    

提交回复
热议问题