$objResponse->addAssign('text_expand_' . $id, "style.display", 'inline'); $objResponse->addAssign('text_collapse_' . $id, "style.display", 'none'); $objResponse->addAssign('info_expand_' . $id, "style.display", 'inline'); $objResponse->addAssign('info_collapse_' . $id, "style.display", 'none'); return $objResponse; } function sessionExpired() { $objResponse = new xajaxResponse(); $objResponse->addAlert('Your session is expired, please reload the page and log in'); return $objResponse; } require_once MAX_PATH . '/lib/xajax/xajax.inc.php'; $xajax = new xajax(); //$xajax->debugOn(); // Uncomment this line to turn debugging on $xajax->debugOff(); // Uncomment this line to turn debugging on //$xajax->registerFunction("testAjax"); $xajax->registerFunction("expandOSURow"); $xajax->registerFunction("collapseOSURow"); $xajax->registerFunction("sessionExpired"); // Process any requests. Because our requestURI is the same as our html page, // this must be called before any headers or HTML output have been sent $xajax->processRequests(); $overwrite = true; $jspath = MAX_PATH . '/var/templates_compiled/'; $jsfile = 'oxajax.js'; if (!file_exists($jspath . $jsfile) || $overwrite) { ob_start(); $xajax->printJavascript($jspath, $jsfile); // output the xajax javascript. This must be called between the head tags