javascript - Jquery - parse XML received from URL -
i have url, supposedly should receive xml from. far have this:
function getlocationlist(searchstring) { $.ajax({ url: "http://konkurrence.rejseplanen.dk/bin/rest.exe/location?input=" + searchstring, type: "get", datatype: "html", success: function(data) { //use received data here. alert("test"); } });
tried debug firebug, doesn't go success method. though, in dreamweaver is able post simple alert, inside success method. tried writing xml datatype, doesn't work (in dreamweaver) when write alert(data). shows alert entire xml, when write html datatype.
how xml correctly, , how parse , example "stoplocation" element?
try add error function well.
see enter link description here
this give informations need debug code firefox.
$.ajax({ url: "http://konkurrence.rejseplanen.dk/bin/rest.exe/location?input=" + searchstring, type: "get", datatype: "html", success: function(data) { //use received data here. alert("test"); }, error: function(jqxhr, textstatus, errorthrown ){ // debug here } });
Comments
Post a Comment