$(function() { $("#user_input").autocomplete({ source: "../inc/suchepatient.php", minLength: 3, select: function( event, ui ) { event.preventDefault(); $("#userid_input").val(ui.item.id); $("#user_input").val(ui.item.value); $("#formbenutzersuche").submit(); } }); }); function behandelt(str) { result = $.ajax({ type: 'POST', async: false, url: 'inc/behandelt.php', data: ({ terminid: str }) }).responseText; document.getElementById(str).style.display = 'none'; //window.location.reload(false); } function submitForm(sub) { e.preventDefault(); result = $.ajax({ type: 'POST', async: false, url: 'impfadmin.php', data: ({ aktion: 4, searchdate: sub }) }).responseText; //window.location.reload(false); document.body.innerHTML = result; }