AJAX request failing to retrive xml



I am trying to call a GET on http://ift.tt/1sx39Ff. I receive an alert saying that the request went through. The problem is when I did a simple parse on it and outputted the result in an alert, the HTML code of the page is shown instead. Now I'm not sure if I'm receiving the right data in the first place now. Am I calling the AJAX incorrectly?



<!DOCTYPE html>

<html lang="en" xmlns="http://ift.tt/lH0Osb">
<head>
<script language="javascript" type="text/javascript" src="http://ift.tt/1dW8QIk"></script>
<!--<script src="tasklist.js"> </script>-->
<script>
/* $(document).ready(function(){
Listing();
});*/


(function($){Listing=function(){
$.ajax({
URL:'http://ift.tt/1sx39Ff',
dataType:"xml",

type: "GET",
success: function (data) {
alert(data);
var xmlDoc= new XMLSerializer().serializeToString(data);

alert(xmlDoc.toString());
},
error: function (data) { alert(0) }
})
}})(jQuery);



</script>
</head>

<body>
<script>Listing();</script>
<div id="List"></div>
</body>

No comments:

Post a Comment