Using JQuery this code will allow you to pull data from an external website.
Data must be formatted in JSON format. I can't remember the site I found this on, but it gives a lot of detail on what's happening and why.$.ajax({ url: 'http://domain.com/data-request.php?foo=bar', dataType: 'jsonp', jsonp: 'jsoncallback', timeout: 5000, success: function(data, status){ //data loaded }, error: function(){ //error loading data } });
No comments:
Post a Comment