cfdiv
- Cfidv bindings always expects plain results. ReturnFormat is always 'plain'.
- Call a cfc method that return somethign different from a string throw and exception ( use cfajaxproxy instead ).
Url Binding
bindonload="false"
<cfdiv
bind="url:/railoAjax/tests/cfdiv/files/getHTML.cfm?name={myForm2:name}&age={myForm2:age}"
onBindError="onError"
bindonload="false"
id="mydiv1"/>
Bind onLoad
As default cfdiv try to bind onload.
This example div is binded to the same input fields of the previous example but is also updated onLoad.
onChange event both div will be updated.
<cfdiv
bind="url:/railoAjax/tests/cfdiv/files/getHTML.cfm?name={myForm2:name}&age={myForm2:age}"
onBindError="onError"
id="mydiv1"/>
Call a cfm page that return a json string.
Json is treaten like plain text and is not parsed.
In this example we create a 'p' element on page and not a 'div'. ( tagname="p" )
<cfdiv
bind="url:/railoAjax/tests/cfdiv/files/getName.cfm?myname={myForm3:name}&myage={myForm3:age}"
onBindError="onError"
id="mydiv3"
tagname="p"/>