Forum:Retrieve Wikitext of a page via Ajax request (Javascript)

Greetings and Good Day! I would like to ask if there is a way (via Javascript or JQuery $.ajax) to retrieve the unparsed WikiText of a page in the wiki. I tried searching /api.php but to no avail, however the closes i got to my goal was the use of  as seen below:

var e = ""; $.ajax({ async:false,url:'http://ghelo.wikia.com/api.php?format=txt&action=expandtemplates&text=',success:function(done){ e = done; }}); gheloBoxTXT( e ); //this would pop up a 'window' of sorts

Now the page is Test and so I used and here's what I got.

Array (   [expandtemplates] => Array        ( [*] => Ahahaha


 * la lang
 * ehem{sample}
 * ahu[sample]


 * 1) NO!!! i should not be seeing this!!!

^^ Testing toh!!!

)

) Now, that could've been fine if only it expanded the templates 'just once'. As seen above, the line beginning with the '#' chracter is a tranclution of the  template.  So basically, that shouldn't happen.  Ultimately, my question is how do i retrieve the 'raw' and unparsed 'as is' WikiMark up of a page?

Thank you in advance. FerrousTigrus 08:57, December 3, 2011 (UTC) ^^


 * When you expandtemplates, you expand all of them. To retrieve only the stored wikitext on a page use prop=revisions. For example this link: (change the format when using in your script). --Ciencia Al Poder (talk) -WikiDex 10:41, December 3, 2011 (UTC)