FYI:

Apparently CFLOCATION is bad mkay, ask spike for the long winded reason as
to why :) something about it writing to log files as an error every time its
used.

I've found <cfset getPageContext().forward('yoururl')> works a treat. I have
a shopping cart system which has the "reciept" page, but if a user where to
refresh it would "re-send the form details" so in order to clear the form
values, i used this:

<cfset getPageContext().forward('yoururl')>
<cfset StructClear(form)>

Then if the user where to refresh that page, it would only send blank form
data (ie do a dump on form.fieldnames).

Regards
Scott Barnes


"Andrew Dickinson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Here's a little drama for a Friday morning.
>
> As suggested by several users last week, I added CFLOCATION to the
> IsDefined section of a form submission, in order to stop resubmission of
> the same info upon refresh.
>
> Worked fine, but it never occured to me to test it. And today, I
> discovered by chance an odd consequence.
>
> It suppressed the error messages I had toiled so long over.
>
> Here's the structure as I wrote it before .....
>
> IF IsDefined("Update")
>     IF Error Condition
>          WRITE Error Condition to screen
>     ELSE
>          WRITE Data to Database
>     ENDIF
>     CFLOCATION (same file)
> ENDIF
> FORM
>      (Includes Update button)
> ENDFORM
>
> It took over an hour to work out that the reason my error conditions
> weren't showing up was the placement of the CFLOCATION tag.
>
> I changed it to the following, and it worked.
>
> IF IsDefined("Update")
>     IF Error Condition
>          WRITE Error Condition to screen
>     ELSE
>          WRITE Data to Database
>          CFLOCATION (same file)
>     ENDIF
> ENDIF
> FORM
>      (Includes Update button)
> ENDFORM
>
>



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to