Reply follows...
--- Garry Red 5 <[EMAIL PROTECTED]> wrote:

> We have a problem involving cflocation. In our code
> we have a user-intensive
> form, and when this is processed various
> (complicated) checks are performed
> to ensure data validity. If the numbers entered do
> not meet certain
> conditions, the page uses cflocation to redirect to
> a standard error page.
> However we have received emails suggesting that
> sometimes when this happens,
> and the user pressed back on their browser, their
> inputted data is lost and
> they have to enter it all again.

Some browsers will clear formfields upon a back
button. There's nothing simple that you can do about
that unless you want to rearchitect how you handle
forms.

One way you can rearchitect is to 
1. when the form submit button is pressed, disable the
submit and send data to a validation script in a
hidden frame.
2. after validating using the hidden frame,
if OK,
  send back javascript which submits the form in the
original form frame
if not OK,
  send back javascript which opens a small window
informing the user what validation was not used.

Since the original form frame isn't actually submitted
until it has been validated, then the browser never
clears the form fields and the user retain his/her
data.

By the way, your cflocation code should not work
because of the client/server issue you cited.

=====
I-Lin Kuo
Macromedia CF5 Advanced Developer
Sun Certified Java 2 Programmer


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to