xajax_debug.jsThis optional file contains the debugging module for use with xajax. If you include this module after the standard xajax_core.js module, you will receive debugging messages, including errors, that occur during the processing of your xajax requests. Summary
xajax debugging modulePlease see copyright.inc.php for a detailed description, copyright and license information. xajax. debugThis object contains the variables and functions used to display process state messages and to trap error conditions and report them to the user via a secondary browser window or alert messages as necessary. Summary
writeMessage
Output a debug message to the debug window if available or send to an alert box. If the debug window has not been created, attempt to create it.
prepareDebugText
Convert special characters to their HTML equivellents so they will show up in the xajax.debug.window. executeCommand
Catch any exceptions that are thrown by a response command handler and display a message in the debugger. This is a wrapper function which surrounds the standard xajax.executeCommand function. parseAttributes
Catch any exception thrown during the parsing of response command attributes and display an appropriate debug message. This is a wrapper around the standard xajax.parseAttributes function. $
Catch any exceptions thrown while attempting to locate an HTML element by it’s unique name. This is a wrapper around the standard xajax.tools.$ function. _objectToXML
Generate a message indicating that a javascript object is being converted to xml. Indicate the max depth and size. Then display the size of the object upon completion. Catch any exceptions thrown during the conversion process. This is a wrapper around the standard xajax.tools._objectToXML function. _internalSend
Generate a message indicating that the xajax request is about the be sent to the server. This is a wrapper around the standard xajax._internalSend function. submitRequest
Generate a message indicating that a request is ready to be submitted; providing the URL and the function being invoked. Catch any exceptions thrown and display a message. This is a wrapper around the standard xajax.submitRequest function. initializeRequest
Generate a message indicating that the request object is being initialized. This is a wrapper around the standard xajax.initializeRequest function. processParameters
Generate a message indicating that the request object is being populated with the parameters provided. This is a wrapper around the standard xajax.processParameters function. prepareRequest
Generate a message indicating that the request is being prepared. This may occur more than once for a request if it errors and a retry is attempted. This is a wrapper around the standard xajax.prepareRequest call
Validates that a function name was provided, generates a message indicating that a xajax call is starting and sets a flag in the request object indicating that debugging is enabled for this call. This is a wrapper around the standard xajax.call function. request
Validates that a function name was provided, generates a message indicating that a xajax request is starting and sets a flag in the request object indicating that debugging is enabled for this request. This is a wrapper around the standard xajax.request function. getResponseProcessor
Generate an error message when no reponse processor is available to process the type of response returned from the server. This is a wrapper around the standard xajax.getResponseProcessor function. responseReceived
Generate a message indicating that a response has been received from the server; provide some statistical data regarding the response and the response time. Catch any exceptions that are thrown during the processing of the response and generate a message. This is a wrapper around the standard xajax.responseReceived function. completeRequestGenerate a message indicating that the request has completed and provide some statistics regarding the request and response. This is a wrapper around the standard xajax.completeResponse function. getRequestObject
Generate a message indicating that the request object is being initialized. Catch any exceptions that are thrown during the process or initializing a new request object. This is a wrapper around the standard <xajax.getRequestObject> function. assign
Catch any exceptions thrown during the assignment and display an error message. This is a wrapper around the standard xajax.dom.assign function. |
Stores a ‘unique’ identifier for this session so that an existing debugging window can be detected, else one will be created.
xajax.debug.workId
The default URL that is given to the debugging window upon creation.
xajax.debug.windowSource
A ‘unique’ name used to identify the debugging window that is attached to this xajax session.
xajax.debug.windowID
The parameters that will be used to create the debugging window.
if ( 'undefined' = = typeof xajax.debug.windowStyle ) xajax.debug.windowStyle
The HTML template and CSS style information used to populate the debugging window upon creation.
if ( 'undefined' = = typeof xajax.debug.windowTemplate ) xajax.debug.windowTemplate
xajax.debug.text
xajax.debug.exceptions
xajax.debug.getExceptionText = function( e )
Output a debug message to the debug window if available or send to an alert box.
xajax.debug.writeMessage = function( text, prefix, cls )
Convert special characters to their HTML equivellents so they will show up in the xajax.debug.window.
xajax.debug.prepareDebugText = function( text )
Catch any exceptions that are thrown by a response command handler and display a message in the debugger.
xajax.debug.executeCommand = xajax.executeCommand; xajax.executeCommand = function( args )
Catch any exception thrown during the parsing of response command attributes and display an appropriate debug message.
xajax.debug.parseAttributes = xajax.parseAttributes; xajax.parseAttributes = function( child, obj )
Catch any exceptions thrown while attempting to locate an HTML element by it’s unique name.
xajax.debug.$ = xajax.tools.$; xajax.tools.$ = function( sId )
Generate a message indicating that a javascript object is being converted to xml.
xajax.debug._objectToXML = xajax.tools._objectToXML; xajax.tools._objectToXML = function( obj, guard )
Generate a message indicating that the xajax request is about the be sent to the server.
xajax.debug._internalSend = xajax._internalSend; xajax._internalSend = function( oRequest )
Generate a message indicating that a request is ready to be submitted; providing the URL and the function being invoked.
xajax.debug.submitRequest = xajax.submitRequest; xajax.submitRequest = function( oRequest )
Generate a message indicating that the request object is being initialized.
xajax.debug.initializeRequest = xajax.initializeRequest; xajax.initializeRequest = function( oRequest )
Generate a message indicating that the request object is being populated with the parameters provided.
xajax.debug.processParameters = xajax.processParameters; xajax.processParameters = function( oRequest )
Generate a message indicating that the request is being prepared.
xajax.debug.prepareRequest = xajax.prepareRequest; xajax.prepareRequest = function( oRequest )
Validates that a function name was provided, generates a message indicating that a xajax call is starting and sets a flag in the request object indicating that debugging is enabled for this call.
xajax.debug.call = xajax.call; xajax.call = function()
Validates that a function name was provided, generates a message indicating that a xajax request is starting and sets a flag in the request object indicating that debugging is enabled for this request.
xajax.debug.request = xajax.request; xajax.request = function()
Generate an error message when no reponse processor is available to process the type of response returned from the server.
xajax.debug.getResponseProcessor = xajax.getResponseProcessor; xajax.getResponseProcessor = function( oRequest )
Generate a message indicating that a response has been received from the server; provide some statistical data regarding the response and the response time.
xajax.debug.responseReceived = xajax.responseReceived; xajax.responseReceived = function( oRequest )
Generate a message indicating that the request object is being initialized.
xajax.debug.getRequestObject = xajax.tools.getRequestObject; xajax.tools.getRequestObject = function()
Catch any exceptions thrown during the assignment and display an error message.
if ( xajax.dom.assign )
xajax.debug.isLoaded
Perform a lookup on the command specified by the response command object passed in the first parameter.
xajax.executeCommand = function( obj )
Take the parameters passed in the command of the XML response and convert them to parameters of the args object.
xajax.parseAttributes = function( child, obj )
Shorthand for finding a uniquely named element within the document.
xajax.tools.$ = function( sId )
Convert a javascript object or array into XML suitable for transmission to the server.
xajax.tools._objectToXML = function( obj, guard )
This function is used internally by xajax to initiate a request to the server.
xajax._internalSend = function( oRequest )
Create a request object and submit the request using the specified request type; all request parameters should be finalized by this point.
xajax.submitRequest = function( oRequest )
Initialize a request object, populating default settings, where call specific settings are not already provided.
xajax.initializeRequest = function( oRequest )
Processes request specific parameters and generates the temporary variables needed by xajax to initiate and process the request.
xajax.processParameters = function( oRequest )
Prepares the XMLHttpRequest object for this xajax request.
xajax.prepareRequest = function( oRequest )
Initiates a call to the server.
xajax.call = function()
xajax.request = function()
This function attempts to determine, based on the content type of the reponse, what processor should be used for handling the response data.
xajax.getResponseProcessor = function( oRequest )
Process the response.
xajax.responseReceived = function( oRequest )
Called by the response command queue processor when all commands have been processed.
xajax.completeResponse = function( oRequest )
Assign an element’s attribute to the specified value.
xajax.dom.assign = function( element, property, data )