Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Changes - Before Proceeding to Next Record

Status
Not open for further replies.

bloise

Programmer
Jun 21, 2001
67
US
Hello,

I have a CF form that contains a query that has a result set of many records. I display one record at a time controlling the navigation with next and prev buttons. What I would like to do is...

If the user has made any changes to any entry fields I would like the form to prompt them to say that " this record has been modified and you should press the save button to save your changes before proceeding.

Any thoughts...
Mike
 
To do it with CF, create a hidden field for each field in your form. The hidden fields will contain the data from your query. Then, on the next page, compare each field to the relevant hidden field. If any of them changed, do an update.

You could probably combine Javascript and make it a little simpler. Write a javascript that says, "if any form field changes, change the value of 'update' to 'yes'. Have a hidden field named "update", with a default value of "no".

HTH,

Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top