I want to get an element of ajax response called url
. I tried to run the following code but i get no data back and when i press f12 on firefox i get this error : invalid lable and pointing to status !
could any one tell me how to fix this ajax call?
<div id="phase01"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
$.ajax({
dataType: "jsonp",
url: "http://www.aremotesite.com/episodelink/123456",
success: function(info){
alert( info.data.url);
document.getElementById("phase01").innerHTML = info.data.url ;
}
});
});
</script>
sample data that url link produces when i run on browser:
{
"status": "OK",
"message": "Successfull",
"data": {
"url": "http:\/\/somesite.com\/vod\/133\/12345\/12345.mp4?md5=Zy9f-dfgdfgdfgfdsdf&expires=234234343432",
"poster": "http:\/\/somesite\/ok\/images\/lib\/17\/17_243534543_3453454325342543.jpg",
"title": "episode 10"
}
}