0

i've got the following code for autocompletion

<script>
$( function() {
var availableTags = [
  "Test1", "Test2"];
  $( "#tags" ).autocomplete({
  source: availableTags
  });
  } );
  </script>
  </head>
  <body>
  <a href="./simpleSearch.html"><img src="./logo.png" ></a>
  <form id="searchForm">
  <input type="text" name="searchBar" id="tags" size="50" autofocus>
  <input type="submit" value="Suche">
  </form>
  </body>

Its working fine. Its just the deciding code-section above. But there is always type of "explanation" when i use the autocompletion. A box appears saying "No search results", "1 result is available"...

How can I avoid this?

1 Answers1

0

You could modify your code like so. Also, check out this answer jQuery UI autocomplete strange behavior

$( function() {
var availableTags = [
"Test1", "Test2"];
$( "#tags" ).autocomplete({
 source: availableTags,
 messages: {
    noResults: '',
    results: function() {}
}
});
} );

OR try adding this to your css. it'll help hide the number of results.

.ui-helper-hidden-accessible { display:none; }
Community
  • 1
  • 1
lhavCoder
  • 961
  • 5
  • 7