Jquery Code
<script type="text/javascript">var menuUrl = "http://localhost:3648/PublicService.svc/MenuList";
function caller() {
$.support.cors = true;
$.ajax({
cache: false,
type: "POST",
async: false,
dataType: "json",
url: menuUrl,
success: function (data) {
debugger;
$("#containerDiv").html(data);
},
error: function (xhr) {
debugger;
alert(xhr.responseText);
}
});
}
$(document).ready(function () {
debugger;
caller();
});
</script>
SYMPTON: Message:No Transport Code:0
REASON: You're trying to make cross-domain request
SOLUTION: $.support.cors = true;
No comments:
Post a Comment