2014-07-30
9:39 PM
Examples
Post
$.ajax("TARGET_URL", { "type" : "post", "data" : {"var1" : value1, "var2":value2}, "success" : reqeustSuccess, "complete" : requestComplete, "error" : requestFailure} }); function reqeustSuccess(data, textStatus, jqXHR){ // request success } function requestComplete(jqXHR,textStatus){ if( textStatus == "success" ){ // Request success } else{ // Request failed } } function requestFailure(jqXHR, textStatus, errorThrown){ // request failed }