“Como chamar a função PHP do Ajax” Respostas de código

Como chamar a função PHP do Ajax

$.ajax({ url: 'phpscriptname.php',
         data: {function2call: 'getEmployeesList', otherkey:otherdata},
         type: 'post',
         success: function(output) {
                      alert(output);
         }
});
Jolly Jackal

Concluir a chamada do jQuery php do AJAX | solicitação Ajax

<script type="text/javascript">
    function ajaxCall(formID, showID) {
        var form = $('#' + formID);
        $.ajax({
            type: form.attr('method'),
            url: form.attr('action'),
            data: form.serialize(),
            dataType: "JSON",
            cache: false,
            success: function (data, status, xhr) {
                $('#' + showID).html('').fadeOut('fast');
                $('#' + showID).html(data).fadeIn('slow');
            },
            error: function (xhr, status, error) {
                //alert(xhr);
                console.error(xhr);
            }
        });
    }
</script>
Amin Arjmand

Respostas semelhantes a “Como chamar a função PHP do Ajax”

Perguntas semelhantes a “Como chamar a função PHP do Ajax”

Mais respostas relacionadas para “Como chamar a função PHP do Ajax” em PHP

Procure respostas de código populares por idioma

Procurar outros idiomas de código