Zdravim.
Trosku som sa zasekol. Aktualne pouzivam toto ako sugesciu vstupu.
$(document).ready(function(){
//Autocomplete search using PHP, MySQLi, Ajax and jQuery
//generate suggestion on keyup
$('#employer').keyup(function(e){
e.preventDefault();
var form = $('#hdTutoForm').serialize();
$.ajax({
type: 'POST',
url: 'select_employer.php',
data: form,
dataType: 'json',
success: function(response){
if(response.error){
$('#hdTuto_search').hide();
}
else{
$('#hdTuto_search').show().html(response.data);
}
}
});
});
//fill the input
$(document).on('click', '.list-gpfrm-list', function(e){
e.preventDefault();
$('#hdTuto_search').hide();
var fullname = $(this).data('fullname');
var id = $(this).data('id');
$('#employer').val(fullname);
$('#employerid').val(id);
});
});
</script>
Ako to ohnut tak aby to vracalo vysledky az po 3 vlozenych znakoch?
Dakujem za pomoc