[RESOLVED]JQuery Autocomplete Message

Hello everyone and thanks for your help in advance.  I am creating a search function with the Autocomplete widget.  This is probably a very stupid question, but each time data is returned, the message"

XX results are available, use up and down arrow keys to navigate

The code I am using is:

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js" ></script>
    <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js" ></script>
    <script type="text/javascript">
        //
        // based on http://techbrij.com/jquery-ui-autocomplete-asp-net-web-api
        //
        var searchUrl = "PatientSearch.aspx?LastName=";
           $(function () {
        
               $('#txtPatientLastName').autocomplete({
        
                   source: function (request, response) {
                       //alert(request.term);
                       $.ajax({
                           
                           url:  searchUrl + request.term,
                           type: 'GET',
                           cache: false,
                           data: request,
                           dataType: 'json',
                           success: function (json) {
                               response($.map(json, function (item) {
                                   return { value: item.value, id: item.label }
                               }))                          

                           },
                           error: function (XMLHttpRequest, textStatus, errorThrown) {
                               //alert('error - ' + textStatus);
                               console.log('error', textStatus, errorThrown);
                           }
                       });
                   },
                   minLength: 2,
                   select: function (event, ui) {
                       var info = ui.item.value;
                       var lfi = info.split('|');
                       $("#txtPatientLastName").val($.trim(lfi[0]));
                       $("#txtPatientFirstName").val($.trim(lfi[1]));
                       $("#txtPatientDOB").val($.trim(lfi[2]));
                       $("#txtPatientID").val($.trim(lfi[3]));
                       return false;
                   }
               })
           });
  </script>

I really can’t figure out where this message is coming from or how to get rid of it.  Any help on this stupid question would be appreciated.

OK, so it’s obviously hidden with the style sheet.  Couldn’t find it in the documentation, but now I know.

Hi kmcnet,

kmcnet

so it’s obviously hidden with the style sheet.  Couldn’t find it in the documentation

Yes, as you said it is hidden.

Best Regards,

Sw-ing

Leave a Reply