I want to call the other Domain Webservice(https://web.bet9ja.com/Controls/MarketWS.asmx/getClientActiveLive)
in my web page that is not working my code is given below,
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
alert("inside");
$("[id*=btnSubmit]").click(function () {
var name = '75';
var age = '2';
alert(name + " - " + age);
$.ajax({
type: "POST",
url: "https://web.bet9ja.com/Controls/MarketWS.asmx/getClientActiveLive",
data: "{ 'IDBookmaker': 75, 'IDLingua': 2, 'PartialResults': false}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (r) {
if (r.d.length>0) {
alert("something available");
}
alert(r.d);
},
error: function (r) {
alert(r.responseText);
},
failure: function (r) {
alert(r.responseText);
}
});
return false;
});
});
</script>
kindly give the solution..