Hi all,
function DisplayMessageCall() {
var pageUrl = '<%=ResolveUrl("http://192.168.141.43//MCHWebservice//CallService.asmx")%>'
$.ajax({
type: "Get",
url: pageUrl + "/TestHTML",
data: '{}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccessCall,
error: OnErrorCall
});
}
function OnSuccessCall() {
alert("success");
}
function OnErrorCall(response) {
alert("Failure");
}
Here,
I am trying to call TestHTML method, which returns the values in the format of XML.
and i am trying to run the above code but everytime i am getting failure message.

Akkiraju IvaturiPosted Aug 19, 2012, 1:53 AM
http://www.codeproject.com/Articles/349598/Introduction-to-using-jQuery-with-Web-Services
Venkatesh KumarPosted Aug 19, 2012, 1:46 AM
If you are try to call a HTML page, if its same domain as we call directly. or its different domain we need to check the alternatives.
http://www.codeproject.com/Articles/78757/Making-Cross-Domain-jQuery-AJAX-Calls
if you return JSON format , we can try the below getJSON API:
http://api.jquery.com/jQuery.getJSON/
SIVAPosted Jun 7, 2012, 11:10 AM
Satyapriya NayakPosted Jun 7, 2012, 10:51 AM
Please refer the below link
http://www.c-sharpcorner.com/UploadFile/sapnabeniwal/consuming-asp-net-web-service-through-jquery/
Thanks