jquery-ui autocomplete press enter is not working with ajax loaded form -


i have autocomplete search work fine when hit search button, not work when press enter on keyboard , can not figure out problem is, it's jquery ajax! or html! , tried autofocus again not work. can direct me in right direction?

the code this:

<div style="color:white;" class="form-group  is-empty">     @html.textbox("orderid", null, new { @class = "form-control", placeholder = "order nr", @id = "search_term" })      <span class="material-input"></span> </div> <button type="submit" onclick="searchorderlist(0,$('#search_term').val())" class="btn btn-white btn-round btn-just-icon">     <i class="material-icons">search</i><div class="ripple-container"></div> </button>  $("#search_term").autocomplete({     source: function (request, response) {          $.ajax({             url: "/account/searchautocomplete",             type: "post",             datatype: "json",             data: { term: request.term },             change: function (event, ui) {                  console.log("blala");             },             success: function (data) {                 response($.map(data, function (item) {                     return { label: item.text, value: item.text };                 }));              }         });     }, }); 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -