ajaxLink

Description

Causes an HTML href attribute to display link results in the current Ajax container. When the browser follows a link that is specified by this function, the HTTP response does not replace the current page; instead, it populates the containing cfdiv, cflayoutarea, cfpod, or cfwindow control.

Categories

Related

History

ColdFusion 8: Added this function.

Syntax

AjaxLink(URL)

Attributes

AttributeDescriptionRequiredDefault
URLThe URL of the link.

Returns

Code that causes the linked page to be displayed in the containing control.

Usage

This function has an effect only when it is used to specify the URL of an href attribute when the HTML a tag is inside a cfdiv, cflayoutarea, cfpod, or cfwindow control. Otherwise, the link has its normal effect.
To prevent cross-site scripting, ColdFusion does not load a remote web page.

Example

<cfpod height="600" width="600" name="podTest"> 
    <a href="<cfoutput>#AjaxLink('HelloWorld.cfm')#</cfoutput>">Click me</a> 
</cfpod>