The Wikipedia articles are displayed in an iFrame in the app cuz it’s a Phonegap app for iOS, Android, etc for mobile devices and also there’ll be a web browser version. The user clicks a link in a Google map infoWindow, a link to a related Wikipedia article, and then the article is displayed in the app in an iFrame.
I see at http://www.mediawiki.org/wiki/Manual:Ajax the following code, which is working OK: $.ajax({ url: 'http://www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=general&format=json&callback=myCallBack', data: {format: 'json' }, dataType: 'jsonp', success: function(jsonObject) {var ttt; } }); Can I alter this a little bit so that I include the title of the article and whether I want it in mobile or desktop format. What I want back from the call is the HTML article itself. ja On Oct 15, 2014, at 2:40 PM, John <[email protected]> wrote: > Why are you trying to use iframes? > > On Wednesday, October 15, 2014, jim andrews <[email protected]> wrote: > I need to retrieve Wikipedia articles (the URLs of which are not known until > run time) and display them in an iFrame using jQuery AJAX. > > Could someone please give me some sample code on how to do this? > > Thanks! > ja > http://vispo.com > _______________________________________________ > Mediawiki-api mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api > _______________________________________________ > Mediawiki-api mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
