use jsonp to get xml cross domain
- by lmkk
I am trying to read xml into a webpage from another server, and I assume that my problem is Same-Origin Policy, and therefore a cross domain problem.
I have a bit of googling and it seems that jsonp is the way forward.
Based on some examples I found here on stackoverflow and another sites, this is what I have, and it does not "hit" the server with the xml. I can view the xml in a browser.
$(document).ready(function(){
$.ajax({
type: 'GET',
dataType: 'jsonp',
url: 'http://192.168.0.106:8111/getconfiguration?',
success: function (xml)
{ //do stuff with received xml
}});
Any suggestions? please keep in mind that I am a newbie with regards to JS / JQuery ;o)