xajaxResponse. inc.php

Contains the response class.

Summary
Contains the response class.
Please see copyright.inc.php for a detailed description, copyright and license information.
Collect commands to be sent back to the browser in response to a xajax request.
Stores the commands that will be sent to the browser in the response.
The name of the encoding method you wish to use when dealing with special characters.
Convert special characters to the HTML equivellent.
A reference to the global plugin manager.
Create and initialize a xajaxResponse object.
Overrides the default character encoding (or the one specified in the constructor) to the specified character encoding.
Convert special characters to their HTML equivellent automatically (only works if the mb_string extension is available).
Provides access to registered response plugins.
Magic function for PHP 5.
Response command that prompts user with [ok] [cancel] style message box.
Response command indicating that the specified value should be assigned to the given element’s attribute.
Response command that indicates the specified data should be appended to the given element’s property.
Response command to prepend the specified value onto the given element’s property.
Replace a specified value with another value within the given element’s property.
Response command used to clear the specified property of the given element.
Response command used to assign a value to a member of a javascript object (or element) that is specified by the context member of the request.
Response command used to append a value onto the specified member of the javascript context object (or element) specified by the context member of the request.
Response command used to prepend the speicified data to the given member of the current javascript object specified by context in the current request.
Response command used to clear the value of the property specified in the sAttribute parameter.
Response command that is used to display an alert message to the user.
Response command that causes the browser to navigate to the specified URL.
Response command that is used to execute a portion of javascript on the browser.
Response command that indicates that the specified javascript function should be called with the given (optional) parameters.
Response command used to remove an element from the document.
Response command used to create a new element on the browser.
Response command used to insert a new element just prior to the specified element.
Response command used to insert a new element after the specified one.
Response command used to create an input element on the browser.
Response command used to insert a new input element preceeding the specified element.
Response command used to insert a new input element after the specified element.
Response command used to set an event handler on the browser.
Response command used to install an event handler on the specified element.
Response command used to remove an event handler from an element.
Response command used to construct a javascript function on the browser.
Response command used to construct a wrapper function around and existing javascript function on the browser.
Response command used to load a javascript file on the browser.
Response command used to include a javascript file on the browser if it has not already been loaded.
Response command used to remove a SCRIPT reference to a javascript file on the browser.
Response command used to include a LINK reference to the specified CSS file on the browser.
Response command used to remove a LINK reference to a CSS file on the browser.
Response command instructing xajax to pause while the CSS files are loaded.
Response command instructing xajax to delay execution of the response commands until a specified condition is met.
Response command which instructs xajax to pause execution of the response commands, returning control to the browser so it can perform other commands asynchronously.
Stores a value that will be passed back as part of the response.
Returns the current content type that will be used for the response packet.
Prints the output, generated from the commands added to the response, that will be sent to the browser.
Used internally to generate the response headers.
Merges the response commands from the specified xajaxResponse object with the response commands in this xajaxResponse object.
Adds a response command that is generated by a plugin.
Add a response command to the array of commands that will be sent to the browser.
Used internally to print XML start tag.
Used internally to generate the command output.
Prints an XML representation of the command.
Prints an XML representation of a php array suitable for inclusion in the response to the browser.
Escape the specified data if necessary, so special characters in the command data does not interfere with the structure of the response.
Recursively serializes a data structure in an array so that it can be sent to the browser.

xajax response class

Please see copyright.inc.php for a detailed description, copyright and license information.

xajaxResponse

Collect commands to be sent back to the browser in response to a xajax request.  Commands are encoded and packaged in a format that is acceptable to the response handler from the javascript library running on the client side.

Common commands include

Elements are identified by the value of the HTML id attribute.  If you do not see your updates occuring on the browser side, ensure that you are using the correct id in your response.

Summary
Stores the commands that will be sent to the browser in the response.
The name of the encoding method you wish to use when dealing with special characters.
Convert special characters to the HTML equivellent.
A reference to the global plugin manager.
Create and initialize a xajaxResponse object.
Overrides the default character encoding (or the one specified in the constructor) to the specified character encoding.
Convert special characters to their HTML equivellent automatically (only works if the mb_string extension is available).
Provides access to registered response plugins.
Magic function for PHP 5.
Response command that prompts user with [ok] [cancel] style message box.
Response command indicating that the specified value should be assigned to the given element’s attribute.
Response command that indicates the specified data should be appended to the given element’s property.
Response command to prepend the specified value onto the given element’s property.
Replace a specified value with another value within the given element’s property.
Response command used to clear the specified property of the given element.
Response command used to assign a value to a member of a javascript object (or element) that is specified by the context member of the request.
Response command used to append a value onto the specified member of the javascript context object (or element) specified by the context member of the request.
Response command used to prepend the speicified data to the given member of the current javascript object specified by context in the current request.
Response command used to clear the value of the property specified in the sAttribute parameter.
Response command that is used to display an alert message to the user.
Response command that causes the browser to navigate to the specified URL.
Response command that is used to execute a portion of javascript on the browser.
Response command that indicates that the specified javascript function should be called with the given (optional) parameters.
Response command used to remove an element from the document.
Response command used to create a new element on the browser.
Response command used to insert a new element just prior to the specified element.
Response command used to insert a new element after the specified one.
Response command used to create an input element on the browser.
Response command used to insert a new input element preceeding the specified element.
Response command used to insert a new input element after the specified element.
Response command used to set an event handler on the browser.
Response command used to install an event handler on the specified element.
Response command used to remove an event handler from an element.
Response command used to construct a javascript function on the browser.
Response command used to construct a wrapper function around and existing javascript function on the browser.
Response command used to load a javascript file on the browser.
Response command used to include a javascript file on the browser if it has not already been loaded.
Response command used to remove a SCRIPT reference to a javascript file on the browser.
Response command used to include a LINK reference to the specified CSS file on the browser.
Response command used to remove a LINK reference to a CSS file on the browser.
Response command instructing xajax to pause while the CSS files are loaded.
Response command instructing xajax to delay execution of the response commands until a specified condition is met.
Response command which instructs xajax to pause execution of the response commands, returning control to the browser so it can perform other commands asynchronously.
Stores a value that will be passed back as part of the response.
Returns the current content type that will be used for the response packet.
Prints the output, generated from the commands added to the response, that will be sent to the browser.
Used internally to generate the response headers.
Merges the response commands from the specified xajaxResponse object with the response commands in this xajaxResponse object.
Adds a response command that is generated by a plugin.
Add a response command to the array of commands that will be sent to the browser.
Used internally to print XML start tag.
Used internally to generate the command output.
Prints an XML representation of the command.
Prints an XML representation of a php array suitable for inclusion in the response to the browser.
Escape the specified data if necessary, so special characters in the command data does not interfere with the structure of the response.
Recursively serializes a data structure in an array so that it can be sent to the browser.

Variables

aCommands

var $aCommands

Stores the commands that will be sent to the browser in the response.

sCharacterEncoding

var $sCharacterEncoding

The name of the encoding method you wish to use when dealing with special characters.  See <xajax->setEncoding> for more information.

bOutputEntities

var $bOutputEntities

Convert special characters to the HTML equivellent.  See also <xajax->bOutputEntities> and xajax->setFlag.

objPluginManager

var $objPluginManager

A reference to the global plugin manager.

Functions

xajaxResponse

function xajaxResponse()

Create and initialize a xajaxResponse object.

setCharacterEncoding

function setCharacterEncoding($sCharacterEncoding)

Overrides the default character encoding (or the one specified in the constructor) to the specified character encoding.

sCharacterEncoding(string): The encoding method to use for this response.

See also, <xajaxResponse->xajaxResponse>()

Returns

objectThe xajaxResponse object.

setOutputEntities

function setOutputEntities($bOutputEntities)

Convert special characters to their HTML equivellent automatically (only works if the mb_string extension is available).

bOption(boolean): Convert special characters

Returns

objectThe xajaxResponse object.

plugin

function &plugin()

Provides access to registered response plugins.  If you are using PHP 4 or 5, pass the plugin name as the first argument, the plugin method name as the second argument and subsequent arguments (if any) to be passed along to the plugin.

Optionally, if you use PHP 5, you can pass just the plugin name as the first argument and the plugin object will be returned.  You can then access the methods of the plugin directly.

sName(string): Name of the plugin.
sFunction(string, optional): The name of the method to call.
arg1...argn(mixed, optional): Additional arguments to pass on to the plugin function.

Returns

objectThe plugin specified by sName.

__get

function &__get($sPluginName)

Magic function for PHP 5.  Used to permit plugins to be called as if they where native members of the xajaxResponse instance.

sPluginName(string): The name of the plugin.

Returns

objectThe plugin specified by sPluginName.

confirmCommands

function confirmCommands($iCmdNumber,
$sMessage)

Response command that prompts user with [ok] [cancel] style message box.  If the user clicks cancel, the specified number of response commands following this one, will be skipped.

iCmdNumber(integer): The number of commands to skip upon cancel.
sMessage(string): The message to display to the user.

Returns

objectThe xajaxResponse object.

assign

function assign($sTarget,
$sAttribute,
$sData)

Response command indicating that the specified value should be assigned to the given element’s attribute.

sTarget(string): The id of the html element on the browser.
sAttribute(string): The property to be assigned.
sData(string): The value to be assigned to the property.

Returns

objectThe xajaxResponse object.

Example

$objResponse->assign(“contentDiv”, “innerHTML”, “Some Text”);

append

function append($sTarget,
$sAttribute,
$sData)

Response command that indicates the specified data should be appended to the given element’s property.

sTarget(string): The id of the element to be updated.
sAttribute(string): The name of the property to be appended to.
sData(string): The data to be appended to the property.

Returns

objectThe xajaxResponse object.

prepend

function prepend($sTarget,
$sAttribute,
$sData)

Response command to prepend the specified value onto the given element’s property.

sTarget(string): The id of the element to be updated.
sAttribute(string): The property to be updated.
sData(string): The value to be prepended.

Returns

objectThe xajaxResponse object.

replace

function replace($sTarget,
$sAttribute,
$sSearch,
$sData)

Replace a specified value with another value within the given element’s property.

sTarget(string): The id of the element to update.
sAttribute(string): The property to be updated.
sSearch(string): The needle to search for.
sData(string): The data to use in place of the needle.

clear

function clear($sTarget,
$sAttribute)

Response command used to clear the specified property of the given element.

sTarget(string): The id of the element to be updated.
sAttribute(string): The property to be clared.

Returns

objectThe xajaxResponse object.

contextAssign

function contextAssign($sAttribute,
$sData)

Response command used to assign a value to a member of a javascript object (or element) that is specified by the context member of the request.  The object is referenced using the ‘this’ keyword in the sAttribute parameter.

sAttribute(string): The property to be updated.
sData(string): The value to assign.

Returns

objectThe xajaxResponse object.

contextAppend

function contextAppend($sAttribute,
$sData)

Response command used to append a value onto the specified member of the javascript context object (or element) specified by the context member of the request.  The object is referenced using the ‘this’ keyword in the sAttribute parameter.

sAttribute(string): The member to be appended to.
sData(string): The value to append.

Returns

objectThe xajaxResponse object.

contextPrepend

function contextPrepend($sAttribute,
$sData)

Response command used to prepend the speicified data to the given member of the current javascript object specified by context in the current request.  The object is access via the ‘this’ keyword in the sAttribute parameter.

sAttribute(string): The member to be updated.
sData(string): The value to be prepended.

Returns

objectThe xajaxResponse object.

contextClear

function contextClear($sAttribute)

Response command used to clear the value of the property specified in the sAttribute parameter.  The member is access via the ‘this’ keyword and can be used to update a javascript object specified by context in the request parameters.

sAttribute(string): The member to be cleared.

Returns

objectThe xajaxResponse object.

alert

function alert($sMsg)

Response command that is used to display an alert message to the user.

sMsg(string): The message to be displayed.

Returns

objectThe xajaxResponse object.

redirect

function redirect($sURL,  
$iDelay = )

Response command that causes the browser to navigate to the specified URL.

sURL(string): The relative or fully qualified URL.
iDelay(integer, optional): Number of seconds to delay before the redirect occurs.

Returns

objectThe xajaxResponse object.

script

function script($sJS)

Response command that is used to execute a portion of javascript on the browser.  The script runs in it’s own context, so variables declared locally, using the ‘var’ keyword, will no longer be available after the call.  To construct a variable that will be accessable globally, even after the script has executed, leave off the ‘var’ keyword.

sJS(string): The script to execute.

Returns

objectThe xajaxResponse object.

call

function call()

Response command that indicates that the specified javascript function should be called with the given (optional) parameters.

arg1(string): The name of the function to call.
arg2 .. argnarguments to be passed to the function.

Returns

objectThe xajaxResponse object.

remove

function remove($sTarget)

Response command used to remove an element from the document.

sTarget(string): The id of the element to be removed.

Returns

objectThe xajaxResponse object.

create

function create($sParent,  
$sTag,  
$sId,  
$sType = null)

Response command used to create a new element on the browser.

sParent(string): The id of the parent element.
sTag(string): The tag name to be used for the new element.
sId(string): The id to assign to the new element.
sType(string, optional): The type of tag, deprecated, use xajaxResponse->createInput instead.

Returns

objectThe xajaxResponse object.

insert

function insert($sBefore,
$sTag,
$sId)

Response command used to insert a new element just prior to the specified element.

sBefore(string): The element used as a reference point for the insertion.
sTag(string): The tag to be used for the new element.
sId(string): The id to be used for the new element.

Returns

objectThe xajaxResponse object.

insertAfter

function insertAfter($sAfter,
$sTag,
$sId)

Response command used to insert a new element after the specified one.

sAfter(string): The id of the element that will be used as a reference for the insertion.
sTag(string): The tag name to be used for the new element.
sId(string): The id to be used for the new element.

Returns

objectThe xajaxResponse object.

createInput

function createInput($sParent,
$sType,
$sName,
$sId)

Response command used to create an input element on the browser.

sParent(string): The id of the parent element.
sType(string): The type of the new input element.
sName(string): The name of the new input element.
sId(string): The id of the new element.

Returns

objectThe xajaxResponse object.

insertInput

function insertInput($sBefore,
$sType,
$sName,
$sId)

Response command used to insert a new input element preceeding the specified element.

sBefore(string): The id of the element to be used as the reference point for the insertion.
sType(string): The type of the new input element.
sName(string): The name of the new input element.
sId(string): The id of the new input element.

Returns

objectThe xajaxResponse object.

insertInputAfter

function insertInputAfter($sAfter,
$sType,
$sName,
$sId)

Response command used to insert a new input element after the specified element.

sAfter(string): The id of the element that is to be used as the insertion point for the new element.
sType(string): The type of the new input element.
sName(string): The name of the new input element.
sId(string): The id of the new input element.

Returns

objectThe xajaxResponse object.

setEvent

function setEvent($sTarget,
$sEvent,
$sScript)

Response command used to set an event handler on the browser.

sTarget(string): The id of the element that contains the event.
sEvent(string): The name of the event.
sScript(string): The javascript to execute when the event is fired.

Returns

objectThe xajaxResponse object.

addHandler

function addHandler($sTarget,
$sEvent,
$sHandler)

Response command used to install an event handler on the specified element.

sTarget(string): The id of the element.
sEvent(string): The name of the event to add the handler to.
sHandler(string): The javascript function to call when the event is fired.

You can add more than one event handler to an element’s event using this method.

Returns

objectThe xajaxResponse object.

removeHandler

function removeHandler($sTarget,
$sEvent,
$sHandler)

Response command used to remove an event handler from an element.

sTarget(string): The id of the element.
sEvent(string): The name of the event.
sHandler(string): The javascript function that is called when the event is fired.

Returns

objectThe xajaxResponse object.

setFunction

function setFunction($sFunction,
$sArgs,
$sScript)

Response command used to construct a javascript function on the browser.

sFunction(string): The name of the function to construct.
sArgs(string): Comma separated list of parameter names.
sScript(string): The javascript code that will become the body of the function.

Returns

objectThe xajaxResponse object.

wrapFunction

function wrapFunction($sFunction,
$sArgs,
$aScripts,
$sReturnValueVariable)

Response command used to construct a wrapper function around and existing javascript function on the browser.

sFunction(string): The name of the existing function to wrap.
sArgs(string): The comma separated list of parameters for the function.
aScripts(array): An array of javascript code snippets that will be used to build the body of the function.  The first piece of code specified in the array will occur before the call to the original function, the second will occur after the original function is called.
sReturnValueVariable(string): The name of the variable that will retain the return value from the call to the original function.

Returns

objectThe xajaxResponse object.

includeScript

function includeScript($sFileName)

Response command used to load a javascript file on the browser.

sFileName(string): The relative or fully qualified URI of the javascript file.

Returns

objectThe xajaxResponse object.

includeScriptOnce

function includeScriptOnce($sFileName)

Response command used to include a javascript file on the browser if it has not already been loaded.

sFileName(string): The relative for fully qualified URI of the javascript file.

Returns

objectThe xajaxResponse object.

removeScript

function removeScript($sFileName,  
$sUnload =  '')

Response command used to remove a SCRIPT reference to a javascript file on the browser.  Optionally, you can call a javascript function just prior to the file being unloaded (for cleanup).

sFileName(string): The relative or fully qualified URI of the javascript file.
sUnload(string): Name of a javascript function to call prior to unlaoding the file.

Returns

objectThe xajaxResponse object.

includeCSS

function includeCSS($sFileName)

Response command used to include a LINK reference to the specified CSS file on the browser.  This will cause the browser to load and apply the style sheet.

sFileName(string): The relative or fully qualified URI of the css file.

Returns

objectThe xajaxResponse object.

removeCSS

function removeCSS($sFileName)

Response command used to remove a LINK reference to a CSS file on the browser.  This causes the browser to unload the style sheet, effectively removing the style changes it caused.

sFileName(string): The relative or fully qualified URI of the css file.

Returns

objectThe xajaxResponse object.

waitForCSS

function waitForCSS($iTimeout =  600)

Response command instructing xajax to pause while the CSS files are loaded.  The browser is not typically a multi-threading application, with regards to javascript code.  Therefore, the CSS files included or removed with xajaxResponse->includeCSS and xajaxResponse->removeCSS respectively, will not be loaded or removed until the browser regains control from the script.  This command returns control back to the browser and pauses the execution of the response until the CSS files, included previously, are loaded.

iTimeout(integer): The number of 1/10ths of a second to pause before timing out and continuing with the execution of the response commands.

Returns

objectThe xajaxResponse object.

waitFor

function waitFor($script,
$tenths)

Response command instructing xajax to delay execution of the response commands until a specified condition is met.  Note, this returns control to the browser, so that other script operations can execute.  xajax will continue to monitor the specified condition and, when it evaulates to true, will continue processing response commands.

script(string): A piece of javascript code that evaulates to true or false.
tenths(integer): The number of 1/10ths of a second to wait before timing out and continuing with the execution of the response commands.

Returns

objectThe xajaxResponse object.

sleep

function sleep($tenths)

Response command which instructs xajax to pause execution of the response commands, returning control to the browser so it can perform other commands asynchronously.  After the specified delay, xajax will continue execution of the response commands.

tenths(integer): The number of 1/10ths of a second to sleep.

Returns

objectThe xajaxResponse object.

setReturnValue

function setReturnValue($value)

Stores a value that will be passed back as part of the response.  When making synchronous requests, the calling javascript can obtain this value immediately as the return value of the xajax.call function.

value(mixed): Any value.

Returns

objectThe xajaxResponse object.

getContentType

function getContentType()

Returns the current content type that will be used for the response packet.  (typically: “text/xml”)

Returns

stringThe content type.

getOutput

function getOutput()

printOutput

function printOutput()

Prints the output, generated from the commands added to the response, that will be sent to the browser.

Returns

stringThe textual representation of the response commands.

_sendHeaders

function _sendHeaders()

Used internally to generate the response headers.

getCommandCount

function getCommandCount()

Returns

integerThe number of commands in the response.

loadCommands

function loadCommands($mCommands,  
$bBefore = false)

Merges the response commands from the specified xajaxResponse object with the response commands in this xajaxResponse object.

mCommands(object): xajaxResponse object.
bBefore(boolean): Add the new commands to the beginning of the list.

addPluginCommand

function addPluginCommand($objPlugin,
$aAttributes,
$mData)

Adds a response command that is generated by a plugin.

objPlugin(object): A reference to a plugin object.
aAttributes(array): Array containing the attributes for this response command.
mData(mixed): The data to be sent with this command.

Returns

objectThe xajaxResponse object.

addCommand

function addCommand($aAttributes,
$mData)

Add a response command to the array of commands that will be sent to the browser.

aAttributes(array): Associative array of attributes that will describe the command.
mData(mixed): The data to be associated with this command.

Returns

objectThe xajaxResponse command.

_printHeader_XML

function _printHeader_XML()

Used internally to print XML start tag.

_printResponse_XML

function _printResponse_XML()

Used internally to generate the command output.

_printCommand_XML

function _printCommand_XML(&$aAttributes)

Prints an XML representation of the command.

aAttributes(array): Associative array of attributes for this command.

_printArray_XML

function _printArray_XML(&$mArray)

Prints an XML representation of a php array suitable for inclusion in the response to the browser.  Arrays sent via this method will be converted into a javascript array on the browser.

mArray(array): Array to be converted.

_printEscapedString_XML

function _printEscapedString_XML(&$sData)

Escape the specified data if necessary, so special characters in the command data does not interfere with the structure of the response.

This could be overridden to allow for transport encodings other than XML.

sData(string): The data to be escaped.

Returns

stringThe escaped data.

_encodeArray

function _encodeArray(&$mData)

Recursively serializes a data structure in an array so that it can be sent to the browser.  This can be thought of as the opposite of <xajaxRequestProcessorPlugin->_parseObjXml>.

mData(mixed): The data to be evaluated.

Returns

mixedThe object constructed from the data.
This file contains detailed information regarding the xajax project, current version, copyrights, licnese and documentation.
var $aCommands
Stores the commands that will be sent to the browser in the response.
var $sCharacterEncoding
The name of the encoding method you wish to use when dealing with special characters.
var $bOutputEntities
Convert special characters to the HTML equivellent.
var $objPluginManager
A reference to the global plugin manager.
function xajaxResponse()
Create and initialize a xajaxResponse object.
function setCharacterEncoding($sCharacterEncoding)
Overrides the default character encoding (or the one specified in the constructor) to the specified character encoding.
function setOutputEntities($bOutputEntities)
Convert special characters to their HTML equivellent automatically (only works if the mb_string extension is available).
function &plugin()
Provides access to registered response plugins.
function &__get($sPluginName)
Magic function for PHP 5.
function confirmCommands($iCmdNumber,
$sMessage)
Response command that prompts user with [ok] [cancel] style message box.
function assign($sTarget,
$sAttribute,
$sData)
Response command indicating that the specified value should be assigned to the given element’s attribute.
function append($sTarget,
$sAttribute,
$sData)
Response command that indicates the specified data should be appended to the given element’s property.
function prepend($sTarget,
$sAttribute,
$sData)
Response command to prepend the specified value onto the given element’s property.
function replace($sTarget,
$sAttribute,
$sSearch,
$sData)
Replace a specified value with another value within the given element’s property.
function clear($sTarget,
$sAttribute)
Response command used to clear the specified property of the given element.
function contextAssign($sAttribute,
$sData)
Response command used to assign a value to a member of a javascript object (or element) that is specified by the context member of the request.
function contextAppend($sAttribute,
$sData)
Response command used to append a value onto the specified member of the javascript context object (or element) specified by the context member of the request.
function contextPrepend($sAttribute,
$sData)
Response command used to prepend the speicified data to the given member of the current javascript object specified by context in the current request.
function contextClear($sAttribute)
Response command used to clear the value of the property specified in the sAttribute parameter.
function alert($sMsg)
Response command that is used to display an alert message to the user.
function redirect($sURL,  
$iDelay = )
Response command that causes the browser to navigate to the specified URL.
function script($sJS)
Response command that is used to execute a portion of javascript on the browser.
function call()
Response command that indicates that the specified javascript function should be called with the given (optional) parameters.
function remove($sTarget)
Response command used to remove an element from the document.
function create($sParent,  
$sTag,  
$sId,  
$sType = null)
Response command used to create a new element on the browser.
function insert($sBefore,
$sTag,
$sId)
Response command used to insert a new element just prior to the specified element.
function insertAfter($sAfter,
$sTag,
$sId)
Response command used to insert a new element after the specified one.
function createInput($sParent,
$sType,
$sName,
$sId)
Response command used to create an input element on the browser.
function insertInput($sBefore,
$sType,
$sName,
$sId)
Response command used to insert a new input element preceeding the specified element.
function insertInputAfter($sAfter,
$sType,
$sName,
$sId)
Response command used to insert a new input element after the specified element.
function setEvent($sTarget,
$sEvent,
$sScript)
Response command used to set an event handler on the browser.
function addHandler($sTarget,
$sEvent,
$sHandler)
Response command used to install an event handler on the specified element.
function removeHandler($sTarget,
$sEvent,
$sHandler)
Response command used to remove an event handler from an element.
function setFunction($sFunction,
$sArgs,
$sScript)
Response command used to construct a javascript function on the browser.
function wrapFunction($sFunction,
$sArgs,
$aScripts,
$sReturnValueVariable)
Response command used to construct a wrapper function around and existing javascript function on the browser.
function includeScript($sFileName)
Response command used to load a javascript file on the browser.
function includeScriptOnce($sFileName)
Response command used to include a javascript file on the browser if it has not already been loaded.
function removeScript($sFileName,  
$sUnload =  '')
Response command used to remove a SCRIPT reference to a javascript file on the browser.
function includeCSS($sFileName)
Response command used to include a LINK reference to the specified CSS file on the browser.
function removeCSS($sFileName)
Response command used to remove a LINK reference to a CSS file on the browser.
function waitForCSS($iTimeout =  600)
Response command instructing xajax to pause while the CSS files are loaded.
function waitFor($script,
$tenths)
Response command instructing xajax to delay execution of the response commands until a specified condition is met.
function sleep($tenths)
Response command which instructs xajax to pause execution of the response commands, returning control to the browser so it can perform other commands asynchronously.
function setReturnValue($value)
Stores a value that will be passed back as part of the response.
function getContentType()
Returns the current content type that will be used for the response packet.
function getOutput()
function printOutput()
Prints the output, generated from the commands added to the response, that will be sent to the browser.
function _sendHeaders()
Used internally to generate the response headers.
function getCommandCount()
function loadCommands($mCommands,  
$bBefore = false)
Merges the response commands from the specified xajaxResponse object with the response commands in this xajaxResponse object.
function addPluginCommand($objPlugin,
$aAttributes,
$mData)
Adds a response command that is generated by a plugin.
function addCommand($aAttributes,
$mData)
Add a response command to the array of commands that will be sent to the browser.
function _printHeader_XML()
Used internally to print XML start tag.
function _printResponse_XML()
Used internally to generate the command output.
function _printCommand_XML(&$aAttributes)
Prints an XML representation of the command.
function _printArray_XML(&$mArray)
Prints an XML representation of a php array suitable for inclusion in the response to the browser.
function _printEscapedString_XML(&$sData)
Escape the specified data if necessary, so special characters in the command data does not interfere with the structure of the response.
function _encodeArray(&$mData)
Recursively serializes a data structure in an array so that it can be sent to the browser.
function setFlag($name,
$value)
Sets a single flag (boolean true or false).
xajax.call = function()
Initiates a call to the server.