Copy link to clipboard
Copied
I have a cfcalendar wrapped with cfform, every first time start the application, it either is empty or give me form data as expired message.
I have tried to set cfform timeout to a 100 or 200 seconds, but if you close the application and next time open it (if after the timeout limits) it shows the form data has expired message again. If I don't set or set it to 0, then the next time I open the browser, it give me an empty form page.
So I wonder if there is a way to catch that exception, and then make it reload the page?
Any ideals to solve the problem.
...
<cfoutput>
<cfheader name="expires" value="#now()#">
<cfheader name="pragma" value="no-cache">
<cfheader name="cache-control" value="no-cache, no-store, must-revalidate">
</cfoutput>
<cfform name="testForm" format="flash" onLoad="#disableRanges#" height="320" width="420" >
<cfcalendar name="selectedDate"
selecteddate="#Form.selectdate#"
mask="mmm dd, yyyy"
dayNames="SU,MO,TU,WE,TH,FR,SA"
monthNames="JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC"
style="rollOverColor:##FF0000;"
width="270" height="200"
onchange="getURL('index.cfm?selectDate=' + (selectedDate.selectedDate.getMonth()+1) + '/' +selectedDate.selectedDate.getDate() + '/' + selectedDate.selectedDate.getFullYear());"
>
</cfform>
...
Thanks,
Bill
Solve the problem with adding preloader="true" tage in cfform.
Copy link to clipboard
Copied
The first thing I would do would be to use an html form instead of flash. The second would be to add a submit button. On change events are very frustrating if you don't make the correct selection on your first attempt.
Copy link to clipboard
Copied
Solve the problem with adding preloader="true" tage in cfform.