I got the access denied error when i am calling external URL from Ajax call. it is working fine without SharePoint 2010.
<script>
function httpGet(theUrl) {
debugger;
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET","http://ip.jsontest.com/", false);
xmlHttp.send(null);
alert(xmlHttp.responseText);
var obj = JSON.parse(xmlHttp.responseText);
alert(obj.ip);
return xmlHttp.responseText;
}
</script>
Please help me to resolve this.
Aucun commentaire:
Enregistrer un commentaire