x6Script
The PHP function x6Script stores a script fragment to be returned
to the browser. If this is called during normal page processing,
it is equivalant to a call to jqDocReady. If it is called on a
JSON call, the script is returned to the browser and executed if
there are no errors.
This function strips the <script> and </script> tags from $parm1 and
so that you can include the script tags if you like.
string - the javascript to execute.
function x6script($parm1) { return x4script($parm1); }
function x4SCRIPT($parm1,$insert = false) {
$parm1 = preg_replace("/<script>/i",'',$parm1);
$parm1 = preg_replace("/<\/script>/i",'',$parm1);
if($insert) {
array_unshift($GLOBALS['AG']['x4']['script'],$parm1);
}
else {
$GLOBALS['AG']['x4']['script'][] = $parm1;
}
}