I use this code to get data as text from a SOAP web service, for example:
$(document).ready(function () {
$("#btn").click( function () {
alert("s");
$.ajax({
url: 'http://magicmap.skmm.gov.my/McmcServicemain_bb.asmx/Login?UserName=navdeep@gmail.com&Password=abc',
dataType: "text",
async: true,
success: function (result) {
alert(result);
},
error: function (request,error) {
alert('Network error has occurred please try again!'+request +error);
}
});
});
});
Here, if I change the URL and use the same JSON using the JSON GENERATOR , it works well and returns data fine.
Is there a difference in these two URLs, please help me, I am stuck here from 2 days. I am new to jQuery. Thanks
source
share