javascript - ajax parse xml response function wont recognize XML file URL -
im using following code solution on here
<script type="text/javascript"> $(document).ready(function(){ $.ajax({ type: "get", datatype: "xml", url: "xmlfile.xml", success: function(xml){ $("#output").append($(xml).find("address")); } }); }); </script>`
and if use local xmlfile.xml file works fine, when try run same function xml file hosted elsewhere, stops working: http://www.zillow.com/webservice/getupdatedpropertydetails.htm?zws-id=x1-zwz1ebcem1ra4r_10irx&zpid=48749425
i tried encoding url using escape()
, encodeuricomponent()
neither of worked.
what doing wrong? why function work local xml file breaks when use other url?
Comments
Post a Comment