Bind with event
One of the features of binding is that we might overlook its binding based on an event. In the previous examples, we mentioned that the normal event trigger for binding took place when the bound field lost its focus. The following example shows a bind that occurs when the key is released:
<cfform id="myForm" format="html"> This is my edit box.<br /> <cfinput type="text" name="myText"> </cfform> <hr /> And this is the bound div container.<br /> <cfdiv bind="{myText@keyup}"></cfdiv>
This is similar to our first example, with the only difference being that the contents of the div are updated as each key is pressed. This works in a manner similar to CFC, JavaScript, and URL bindings. We might also consider binding other elements on a click event, such as a radio button. The following example shows that all bound variables are updated when any event-oriented binding occurs:
<cfform id="myForm" format="html"> This is my...