ColdFusion Losing Data When Browser Re-Fresh

Posted on 2003-03-11
Medium Priority
Last Modified: 2013-12-16
I have server validation on my ColdFusion forms that when you save, it checks to make sure you have valid information in the date and numeric fields. If the data is wrong, then it displays an error message....which is cool. My problem is that when you hit the browser "back" button, all your data is lost. So my users have to re-enter all their data. Is there a way to keep their data, so they only need to correct the invalid field(s)? Maybe at point of saving, somehow send data to a template, then post back after re-fresh?? Thanks in advance. rfranks@adelphia.net
Question by:rfranks
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

CRagsdell earned 100 total points
ID: 8116725
Why is your validation not done client-side?

Yes, you can work around by sending the data to your database, analyze the entries, show error messages and then repopulate the form.

Or just use client-side validation...


Assisted Solution

HamdyHassan earned 100 total points
ID: 8119116
If the validation don't need database, then It's better/faster/easy to do it using javascript at client

Take a look at the following examples

validate date using javascript


Assisted Solution

iredlands earned 100 total points
ID: 8141107
Is your issue the login or the form details not being completed/accurate?

If its the login - set an isDefined() statement on form completion. for info check your docs on cfapplication

If the client uses the back button wrap your form page in an cfif isDefined statement - either pulling db info to poulate the fields or set cflocation to take them to another page

If the form details not completed or accurate is the issue - 2 solutions 1) validate via javascript the details are correct client side or 2) validate on next cfm page if not accurate pass back to form page - variables will still be active, populate your fields

Hope this helps
LVL 53

Expert Comment

ID: 9115231
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

If the user does not know how to close the question, the options are here:



Expert Comment

ID: 9647937
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between CRagsdell, HamdyHassan, iredlands

Please leave any comments here within the next seven days.


EE Cleanup Volunteer

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question