function CallService() { $.ajax({ type: varType, //GET or POST or PUT or DELETE verb beforeSend: function(xhr) { xhr.withCredentials = true; xhr.setRequestHeader('Authorization', 'Basic ' + $.base64.encode($("#tbxUserName").val() + ':' + $("#tbxPassword").val())); }, url: varUrl, // Location of the service data: varData, //Data sent to server contentType: varContentType, // content type sent to server dataType: varDataType, //Expected data format from server processdata: varProcessData, //True or False success: function(msg) {//On Successfull service call //alert('success'); ServiceSucceeded(msg); }, error: function(msg) {//On UnSuccessfull service call alert('failed'); ServiceFailed(msg); } }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)