im using the google charts libaries, just testing the example code in my server everything goes well. BUT, if i put the code in one page, lets call it example.php, if i call example.php from another page using ajax, like:
$.ajax({ url: 'stats-render.php', data: {ref: $(this).attr('id')}, type: 'post', success: function(d) {
$('div.stats-data').html(d);
}});
$('div.stats-data').html('<center><img src="css/img/ajax-loader.gif" alt="loader_IMG" /><br>Rendering your stats</center>');
1000);
});
It does work, obviously there is a problem when i call the example via ajax and not when i call it directly. Any ideas?
You should consider using an iframe to make it works, as the result of the google test page is a complete html page.
Your code becomes :
It loads the content of the google cahrt in your page using an iframe.
If you really wanted to use a div instead of an iframe, you should consider parsing the result of your ajax call and fill your div correctly.