Description

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.

Function syntax

ColdFusion.setGlobalErrorHandler(functionName)

History

ColdFusion 8: Added this function

Parameters

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.

Returns

This function does not return a value.

Usage

If the page that calls this function does not have any ColdFusion AJAX-based controls, 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.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy