$.ajax({
            type: "POST",
            url: "skript.php",
            data: { jmeno: "Aaaa", prijmeni: "Bbbb" }
            error: function (qXHR, textStatus, errorThrow) {
                var errMsg = "Chyba během zpracování: " + url + "\n\nStatus: " + qXHR.status + "\n\n" + qXHR.responseText;
                alert (errMsg);
            },
            success: function (data, textStatus, jqXHR) {
                var vracenaData = data;
  alert(vracenaData);
            }
        });
Vlastimil Pošmura, 2020