How to read and store XML generated by CGI script from a URL address

nicmacc

New Member
I have a problem about reading XML file which generated by CGISay I have a url address like this:\[code\]http://test.mywebsite.com/cgi-bin/generateXML.cgi?listxml=1&oid=10037&bidderid=6217&aid=25731&tote=\[/code\]If I open it in the browser, it will return a xml file and display it in the browser.Now what I need to do is using javascript and jQuery to retrive this XML file generated by this address.I have try the code like:\[code\]$(document).ready(function(){ alert("HELLO!"); var self = this; var target; $.get("http://test.mywebsite.com/cgi-bin/generateXML.cgi?listxml=1&oid=10037&bidderid=6217&aid=25731&tote=", function(d){ $(d).find("sale").each(function(){ target = ($(this).find("target").text()); alert(target); }); });});\[/code\]But this doesn't work. The XML can't be get.Also I need to mention that the code is now on my local computer, and the URL address, the cgi file is on another server. So I guess there may be some cross domain restriction?I just have no idea where to start with. Can anyone help me? Thank you!!
 
Back
Top