I have a simple function that uses $.Ajax. It's working fine when I deploy the this page to my online website, but on my dev environment it doesn't work, but there is no error. I tried both $.Ajax and $.Post. both not working, but in the F12 profiler tool i see the traffic.
Any Idea? Thanks.
<script >
function RunAjax()
{
alert("before post");
$.post("http://myshulmgr.com/GetData.asmx/GetEventMembers", { PID: "32", EventID: "8" },
function (data) {
alert("Data Loaded: " + data);
});
$.ajax({
type: "POST",
url: "http://myshulmgr.com/GetData.asmx/GetEventMembers",
//data: {PID: iPID, EventID: iEventID},
data: "{'PID': '" + 32
+ "','EventID': '" + 8 + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (jsonRes)
{
alert(jsonRes);
},
failure: function (msg)
{
alert(msg);
}
});
}