use jsonp to get xml cross domain

Posted by lmkk on Stack Overflow See other posts from Stack Overflow or by lmkk
Published on 2010-06-18T09:21:24Z Indexed on 2010/06/18 9:33 UTC
Read the original article Hit count: 602

Filed under:
|
|
|

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)

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xss