The fastest easiest way to get it right.

x6Script

NAME

x6Script

FUNCTION

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.

INPUTS

string - the javascript to execute.

SOURCE

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;
    }
}

User Comments

There are no user comments yet on this page.


Add A Comment

Comments will not appear until after they are moderated. Comments are usually moderated within a few hours on weekdays, but may take longer on weekends and holidays.

Name or nickname: (This will appear with your comment)


Email (this will never be displayed)


Enter your comment here. Use [b] and [/b] for bold, [i] and [/i] for italic, and [pre] and [/pre] for code samples. All literal HTML and PHP that you enter will be escaped out and displayed as you enter it.


Home |  Documentation |  Download |  Credits |  Contact |  Login
Andromeda © Copyright 2004-2010, Licensed under the GPL Version 2