Table of Contents
Ajax in Vesuvius Module
we use xajax 3rd party library to map ajax requests to php actions, please replace {name} with your module name.
Main.inc File
calling the library
require_once($global['approot'].'/inc/lib_xajax.inc');
calling “xajax.inc” file
require_once($global['approot'].'/mod/{name}/xajax.inc');
registering actions
shn_xajax_registerFunction('{name}_append_log');
xajax.inc File
create “xajax.inc” in your module folder
push ajax actions to global ajax functions array
global $global; // create an array as it does not exist previosuly and will make warnings $global['xajax_functions'] = array(); // publicly register accessible xajax funtions array_push($global['xajax_functions'],'{name}_append_log');
create the action
function {name}_append_log(){}