jquery - Unexpected token when doing remote json call -


i've searched everywhere can't solve problem:

when copy content of json file locally works (without callback=?)

however when crossdomain call following error in console:

uncaught syntaxerror: unexpected token :

this code:

 var url='http://www.motor-forum.nl/json.php?type=json&callback=?';         $.getjson(url,function(json){             $.each(json.globals, function(i,data){                $("#results").html(data.board_reactid);             });         }); 

hopefully can me out here

i've tried api - not support jsonp. getting stuff remote servers isn't simple going &callback=? on urls - remote server needs openly support it.

jsonp works across cross-domain restrictions loading return in script tag. means object must evaluable script. jsonp, user provides callback name in url, , return json object wrapped in function call (mycallbackname({object});).


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

jsf - disable onscroll event of the icefaces datatable -