Manual:Ajax

MediaWiki offers an AJAX interface for use by extensions. It can be used as follows:


 * set  in LocalSettings.php (if your extension requires Ajax, make it check if $wgUseAjax is true, and if not, fail)
 * in your extension setup code, register a function for use via Ajax:  The function's name may contain :: to reference a function defined inside a class.
 * in your extension's JavaScript code, you can now call your PHP function:  a and b would be the two parameters that myExtensionFunction expects (you can have any number of parameters), and callback is a JavaSCript function that takes an XMLHttpRequest as a parameter - this is used as the standard Ajax callback, that is, that function is called whenever the request's state changes.

General information on XMLHttpRequest:
 * http://www.w3.org/TR/XMLHttpRequest/
 * http://de.wikipedia.org/wiki/XMLHttpRequest
 * http://www.w3schools.com/dom/dom_http.asp