Wednesday, December 15, 2010

JQuery $.ajax call with custom error function

$.ajax({
        url: 'RequestSearchCertificate',
        type: "post",
        data: { registrationNumber: $('#ResultsRegistrationNumberValue').text(),
            changeNumber: $('#ResultsChangeNumberValue').text(),
            searchNumber: $('#ResultsSearchNumberValue').text()
        },
        success: function(response) {
            $('#GenerateCertificateResultDialog').html(response);
            $('#GenerateCertificateResultDialog').dialog("open");
        },
        error: function() {
            alert('error');
        }
    });

No comments:

Post a Comment