I am trying to connect W3Schools sample webservice via jQuery Ajax but it's not working for me.
Here is the JS:
function ConnectToWebService() {
var pdata = "Celsius:123";
$.ajax({
type: "POST",
dataType: "text",
data:pdata,
contentType: "application/text; charset=utf-8",
url: "http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit",
success: function (msg) {
$('#divToBeWorkedOn').html(msg.d);
},
error: function (e) {
alert("could not connect to service");
}
});
}