Thursday, March 1, 2012

Showing the error message of ajax/jquery requests in a web page.

function xxxxx(){
            $.ajax({
                type: "post", url: "test/abc.php",
                success: function (data, text) {                                                           document.getElementById("progress_success").style.display='block';
                        $("#progress_success1").html('You have successfully done');
                  
                },
                error: function (request, status, error) {
                    document.getElementById("progress_error").style.display='block';
                    $("#progress_error1").html(request.responseText);
                }
            });

        }

No comments:

Post a Comment