Skip navigation
Currently Being Moderated

Can you catch form has expired exception and reload page?

May 11, 2012 6:30 AM

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

 
Replies
  • Currently Being Moderated
    May 11, 2012 6:49 AM   in reply to s6868

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points