2011/2/14 Mohamed Mahir Ahamed Ibrahim <mahir78(a)gmail.com>om>:
Thanks Daniel for quick reply.
I tried this code to fetch langlinks but failed
I used jquery, I never used callback functions, i supposed to use
document.write to store the returned callback value?
No. You also shouldn't use format=jsonp. Here's how it's done:
$j.getJSON( 'http://en.wikipedia.org/w/api.php?format=json&callback=?',
{ 'action': 'query', 'prop': 'langlinks',
'lllimit': 500, 'titles':
temp_in }, function( data ) { ... do stuff with data here ... } );
For more information see the jQuery documentation:
http://api.jquery.com/jQuery.getJSON/ and
http://api.jquery.com/jQuery.ajax/
Roan Kattouw (Catrope)