Tuesday, May 29, 2012

How To Test JQUERY AJAX call example by RNAN


$("#UpdateKM").click(function (e)
{
    var upkm = document.getElementById("newKmtxt").value;
    alert('myurl');
    $.ajax(
    {
        url: 'myurl',
        type: 'GET',
        dataType: 'json'
    }).done(function (result)
    {
        alert("done");  //or 1
    }).fail(function (xhr, status,errorThrown)
    {
        alert(errorThrown);   //or 2
    }).
    always(function (jqXHR, complete_textStatus)
    {
        alert('3');
    })
});
THANK U RNAN!!

No comments:

Post a Comment