cancelFromPrepareAjax Method

Summary

Raises a prepareAjax event and returns whether the AJAX should be cancelled.

Syntax
TypeScript
JavaScript
cancelFromPrepareAjax = function( 
   sender, 
   sourceClass, 
   sourceMethod, 
   settings 
) 
static cancelFromPrepareAjax( 
   sender: Object, 
   sourceClass: string, 
   sourceMethod: string, 
   settings: JQueryAjaxSettings 
): boolean; 

Parameters

sender

The source object to pass along to listeners of the prepareAjax event.

sourceClass

The source class, as a string, to use as PrepareAjaxEventArgs.sourceClass.

sourceMethod

The source method, as a string, to use as PrepareAjaxEventArgs.sourceMethod.

settings

A JQueryAjaxSettings object that contains the request information for an upcoming AJAX call.

Return Value

true if PrepareAjaxEventArgs.cancel is true, indicating the AJAX should be cancelled; otherwise false.

Remarks

cancelFromPrepareAjax provides a wrapper for the common task of raising a prepareAjax event with a new PrepareAjaxEventArgs instance and returning the value of PrepareAjaxEventArgs.cancel after any prepareAjax listeners were called.

sender is used directly with the invocation of the event and provided as the first argument in the registered listener. sourceClass, sourceMethod, and settings are used as arguments to the constructor of PrepareAjaxEventArgs, which becomes the second argument in the registered listener.

cancelFromPrepareAjax is useful for writing custom AJAX requests that need to run through prepareAjax.

See prepareAjax for more information.

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document Assembly