$(document).ready(function() {
$('form#search').bind("submit", function(e){
e.preventDefault();
$('#content').html('');
// Define the callback function
function getGeo(jsonData) {
$('#content').append(''+jsonData.rank+'
');
bObj.removeScriptTag();
}
// The web service call
var req = 'http://twittercounter.com/api/?username=Anand_Dasgupta&output=json&results=3&callback=getGeo';
// Create a new request object
bObj = new JSONscriptRequest(req);
// Build the dynamic script tag
bObj.buildScriptTag();
// Add the script tag to the page
bObj.addScriptTag();
});
});
Im tryin to use the cross domain json request to get the json data which is
{
"user_id":"3190399",
"user_name":"Anand_Dasgupta",
"followers_current":"86",
"date_updated":"2009-06-04",
"url":"",
"avatar":"205659924\/DSC09920_normal.JPG",
"follow_days":"0","started_followers":"86",
"growth_since":0,
"average_growth":"0",
"tomorrow":"86",
"next_month":"86",
"followers_yesterday":"86",
"rank":176184,
"followers_2w_ago":null,
"growth_since_2w":86,
"average_growth_2w":"6",
"tomorrow_2w":"92",
"next_month_2w":"266",
"followersperdate":[]
}
im getting the json data from the url
But this code doesnot seem to work. If anyone could polish the code somehow or provide any response it will be highly appreciated. Thank You