Here is my code to access xml from a website
$(document).ready(function () {
$.ajax({
type: "GET",
url: "http://rxnav.nlm.nih.gov/REST/Ndfrt/search?conceptName=TESTOSTERONE",
dataType: "xml",
success: xmlParser
});
});
function xmlParser(xml) {
$(xml).find("entry").each(function () {
$(".entirecont").append($(this).find('inputConceptName').text());
});
}
it's working fine in local when i push this code to production it's giving me the cross domain restrictions.
Here is the JsFiddle
I know it's a cross domain request but, how can i fix it??
Thanks
jsonpis the dataType for it.