Is it possible to load data from a different domain?
I posted this already but the post seems to have disappeared, so sorry if it's a duplicate.
I've looked through the form and can't find an answer to my question - can I make a call from one server to another to recieve some data?
I want to do something like this:
- var callAddress = "";//remote url added here
- var STUID = "";//user id param added here
- var tutID = "";//content identifier ID added here
- function getupdate(){
callAddress = remoteaddress+"/admin/functions/getUsersData.asp?userid="+STUID+"&tutID="+tutid;
- //call to remote url
$.get(callAddress, updateData);
}
function updateData(data){
- //data back from remote url
alert(data);
}
$(document).ready(getupdate);
The idea is to load a users data from a central server, while the actual content can be on multiple domains. When I try the above I get the browser warning about accessing information beyond the pages control. I want to avoid this.
Maybe I need to recieve JSON data or something? No idea what I am doing wrong, but would gratefully appreciate any help or pointers.
Thanks