Trouble with JSON results - not working as expected
The client is using Godaddy free hosting. There is an ad banner, and I think that's the problem.
But here's what's happening.
I send a ajax request to a page
-
$.getJSON("/libs/ajax_get_page.php",{id:id},function(data) {
$("#wide").html(data.wide_col);
});
which works, it goes to the page and returns results as I'd expect, but here's what I get.
-
{"wide_col":"<img src='\/images\/artist.jpg' alt='The Artist' \/>"}</iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->
<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>
you can see the extra ad banner code stuck to the end, which seems to break it and so nothing works inside the $.getJSON. It doesn't populate the <div> I can't even get it write to the console log inside that function (data).
Is there anything that can be done here?
Thanks