画像のjsonpurllを保持する$imgをテストしたいと思います。ベストプラクティスは何ですか?
別の$AJAX呼び出しを埋め込む必要がありますか?
var ebRand = Math.random()+'';
ebRand = ebRand * 75;
var URL = 'http://ox-d.bbt.com/w/1.0/arj?o='+ebRand+'&auid=258624&c.env=rvw';
$.ajax({
async:true,
url: URL,
dataType: 'jsonp',
crossDomain: true,
success: openX,
errror: errorX,
jsonpCallback: 'openX'
});
function openX(data) {
alert('SUccess however load function error.')
var ad = data['ads']['ad'][0]['html'];
$img = $(ad).find('img').attr('src');
//I WANT TO TEST THE $IMG which holds the jsonp url for an image.
//What is the best practive should I embedded another $AJAX call?
console.log(data);
}
function errorX(data){
alert('Error')
}