• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can you catch form has expired exception and reload page?

Explorer ,
May 11, 2012 May 11, 2012

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

Views

793

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , May 11, 2012 May 11, 2012

Solve the problem with adding preloader="true" tage in cfform.

Votes

Translate

Translate
LEGEND ,
May 11, 2012 May 11, 2012

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 11, 2012 May 11, 2012

Copy link to clipboard

Copied

LATEST

Solve the problem with adding preloader="true" tage in cfform.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation