javascript - Storing API in local array -


i'm trying store data api array using javascript. tried doing this:

 $.getjson('http://search.twitter.com/search.json?q=hamburg&rpp=5&lang=all',       function(standings) {         menstandings.append(standings);         alert('done!');     }); 

all want store in array called menstandings{} error:

xmlhttprequest cannot load http://search.twitter.com/search.json?q=hamburg&rpp=5&lang=all. origin null not allowed access-control-allow-origin.

to working can use jsonp, you'd have like:

$.getjson('http://search.twitter.com/search.json?q=hamburg&rpp=5&lang=all&callback=?', function(standings) {         menstandings.append(standings);         alert('done!');     }); 

where have callback=? jquery fill in ? correct function name , wire things you.

you can see example of @ http://jsfiddle.net/bjq6g/1/


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -