i have the following markup/code
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Demo</title>
<script src="directory for jquery script">
$(document).ready(function () {
$("button").on('click', 'test', function() {
var webserUrl = "http://wsf.cdyne.com/WeatherWS/Weather.asmx";
var soapRequest = '<ns1:GetWeatherInformation xmlns:ns1=\'http://ws.cdyne.com/WeatherWS/\' />';
$.ajax({
type: "POST",
url: webserUrl,
contentType: "text/xml",
dataType: "xml",
data: soapRequest,
success: SuccessOccur,
error: ErrorOccur
});
});
});
function SuccessOccur(data, status, req) {
if (status == "success")
alert(req.responseText);
}
function ErrorOccur(data, status, req) {
alert(req.responseText + " " + status);
}
</script>
</head>
<body>
<button id="test">Test</button>
on click of the test button i would like the soap request to be sent but for some reason when i click the button nothing happens, i can confirm it is picing up jquery.js (2.1.1).
I am sure it is a silly mistake but I am not seeing it, the code i have (this is a reworked version) works fine but this code does not.
Any help in picking out the issue is greatly received.
closevote as there are multiple issues (not just the simple typo). Hopefully all now covered below :)