Specifies a function that gets called, in place of the ColdFusion AJAX default error handler, if an error occurs when using a ColdFusion AJAX feature.
ColdFusion.setGlobalErrorHandler(functionName
)
ColdFusion 8: Added this function
Parameter |
Description |
---|---|
functionName |
The name of the JavaScript function to execute when there is an error in ColdFusion AJAX code, such as a binding error. This function must take a single argument, the error message string. |
This function does not return a value.
If the page that calls this function does not have any ColdFusion AJAX-based controls, you must use a cfajaximport tag on the page to ensure that the page includes the JavaScript definition for this function.
The global error handler displays information about errors that occur in ColdFusion AJAX features. The default global error handler displays an alert with the error message. You can use this function to create a custom global error handler, for example, to display a custom error window with additional information about your application.