User Guide Cancel

onAbort

 

Description

Runs when you execute the tag cfabort.

Note: If showError attribute is specified in cfabort, onError method is executed instead of OnAbort.

Note: When using cfabort, cflocation, or cfcontent tags, the OnAbort method is invoked instead on OnRequestEnd.

Returns

Nothing

Syntax

<cffunction name="onAbort" returnType="boolean">
<cfargument type="string" name="targetPage" required=true/>
...
<cfreturn BooleanValue />
</cffunction>

Parameters

Parameter

Description

targetPage

The path from the web root to the requested CFML page.

Example

Application.cfc

<cfcomponent>
<cffunction name="onAbort"
access="public"
returntype="void"
hint="Hanldes Aborted request">

<cfargument type="String"
name="targetPage"
required=true/>
<cfoutput> Target Page: #targetPage#</cfoutput>
<!--- do stuff --->
</cffunction>
</cfcomponent>

Test.cfm

<cfabort>

Get help faster and easier

New user?