Controlling CFDIV content with a CFINPUT date control
Using the new bind functions of CF8 are really nice to use. My websites are easier on the eyes, and more fun to navigate through the use of AJAX functionality.
Another example of how to use this fun stuff:
<cfform>
<tr><td class="pad-content">
Startdate:<cfinput type="datefield" name="startdate" value="#lsdateformat(now()-14, 'd/m/yyyy')#" mask="d/m/yyyy">
</td><td>
Enddate:<cfinput type="datefield" name="enddate" value="#lsdateformat(now(), 'd/m/yyyy')#" mask="d/m/yyyy">
</td>
</tr>
</cfform>
</table><br />
<cfdiv bind="url:page_entrylist_div.cfm?sd={startdate}&ed={enddate}" style="padding-left: 20px;">
Inside this CFDIV this content is loaded:
<cfset startdate = lsparsedatetime(url.sd & " 00:00")>
<cfset enddate = lsparsedatetime(url.ed & " 23:59")>
<cfif datecompare(startdate, enddate) EQ -1>
<cfinvoke component="...">


There are no comments for this entry.
[Add Comment]