Hi…
am trying to use json for live update, on local host works fine, but after uploading to the host am getting errors:
Resource interpreted as Script but transferred with MIME type text/html.
Uncaught SyntaxError: Unexpected token
in my php file am using json_encode, the local php version is 5.2.9, and json version 1.2.1.
on the host php verion 5.2.13, json 1.2.1.
what can the problem !?
$(document).ready(function(){
function GetData() {
$.getJSON("http://site.com/get.php?callback=test", null, function(data) {
if (data != null) {
$('.test').text(data.latest_price);
}
});
}
setInterval(function(){ GetData() },5000);
});
Thanks in advanced for any help !