Manual talk:Ajax

Callback function?
Hello!

Can someone please explain the thing with the "callback function" in a bit more detail? I'd love to call "sortables_init;" to keep my table sortable after I changed their content with "sajax_do_call"...

Thanks in advance! -- 87.179.94.82 22:25, 1 August 2008 (UTC)

registering php function called via ajax
For version 1.12 (at least) stuff below must be put in some file that is called by chain of "require_once" statements, starting in LocalSettings.php

global $wgAjaxExportList; $wgAjaxExportList[] = 'wfYourFunction'; function wfYourFunction{};

server ajax handler won't find wfYourFunction if it is registered from file referred to via $wgAutoloadClasses.

So, What Now?
Now that sajax_do_call and action=ajax are deprecated, what are we supposed to use? I tried using jQuery.ajax to invoke a php file, but the invoked file does not get run in the MediaWiki context and can't use the MediaWiki parser, classes, etc. Unless there's a trick to this that I am missing, I'm jut not sure what to do. This manual page is no help at all; it only has examples calling the API, which may not even be available. 108.6.239.14 17:13, 14 July 2012 (UTC)