Hi all,
I want to call remote web service using Jquery? My code is given below.
$(document).ready(function() {
$('#Save').click(TestingMethod);
}
);
function TestingMethod() {
var BizName = $('#txtBizName').val();
var webMethod = "http://MyWebService/offlinecourse.asmx/TestingMethod";
var parameters = "{str:'" + BizName + "'}";
$.ajax({
url: webMethod,
type: "POST",
dataType: "json",
data: parameters,
contentType: "application/json; charset=utf-8",
success: function(msg) {
$('#status').html('Input is : ' + msg.d);
},
error: function(e) {
$('#status').html = "Unavailable";
}
});
}
