Whatever message this page gives is out now! Go check it out!
<cfdiv
bind = "bind expression"
bindOnLoad = "true|false"
ID = "HTML tag ID"
onBindError = "JavaScript function name"
tagName = "HTML tag name"
/>
OR
<cfdiv
ID = "HTML tag ID"
tagName = "HTML tag name">
tag body contents
</cfdiv>Attribute | Req/Opt | Default | Description |
bind | Optional | A bind expression that returns the container contents. If you specify this attribute the cfdiv tag cannot have a body. Note:: If a CFML page specified in this attribute contains tags that use AJAX features, such as cfform, cfgrid, and cfwindow, you must use a cfajaximport tag on the page with the cfdiv tag. For more information, see cfajaximport. | |
bindOnLoad | Optional | true |
|
ID | Optional | The HTML ID attribute value to assign to the generated container tag. | |
onBindError | Optional | See Description | The name of a JavaScript function to execute if evaluating a bind expression results in an error. The function must take two attributes: an HTTP status code and a message. If you omit this attribute, and have specified a global error handler (by using the ColdFusion.setGlobalErrorHandler function), it displays the error message; otherwise a default error pop-up window appears. To use this attribute, also specify a bind attribute. |
tagName | Optional | DIV | The HTML container tag to create. |
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>cfdiv Example</title>
</head>
<body>
<cfform>
<cfinput name="tinput1" type="text">
</cfform>
<h3> using a div</h3>
<cfdiv bind="url:divsource.cfm?InputText={tinput1}" ID="theDiv"
style="background-color:##CCffFF; color:red; height:350"/>
</body>
</html><h3>Echoing main page input:</h3>
<cfoutput>
<cfif isdefined("url.InputText") AND url.InputText NEQ "">
#url.InputText#
<cfelse>
No input
</cfif>
</cfoutput>