I have an autocomplete that read mysql out * of customersName. On keyup or onchange doesnt matter wich one ,so , if user do not exist in mysql i need to display an new input (hided) and submit button to add new customer by name and email.
I need to know in wich direction to search , didnt find any info thanks.
Js:
$(function() {
if ($('body').is('.PageType')) {
$("#klantnaam").autocomplete({
source: "zoekklant.php",
minLength: 0,
select: function(event, ui) {
event.preventDefault();
$("#klantnaam").val(ui.item.value);
var str = ui.item.id;
document.getElementById('doekprijs').textContent = str + " \u20ac";
}
});
};
});