Transcript Cf_FormSave
Cf_FormSave
Do you wish to Save your
changes??
Hello My Name Is….
• Kevin Penny, Age 27
• Advanced Macromedia Certified Developer
(4.5 , 5) (soon to add MX? )
• Developing Applications for over 5 years
• Primary Database is SQL Server 2K
• Favorite Tag: <cfdump>
Example: Microsoft Word
• Test Document.doc
Why the Need for a
<CF_FormSave> ?
• Needed a usable way to prevent users
from submitting forms that had not
changed
• Needed to be ‘generic’ (for all forms)
• Needed to be fast (client side??)
• Couldn’t be too complex for other team
members to implement on their forms
Options Available?? (Analysis)
• Triggers in Database
– Too cumbersome
– Server Trip Required
– Have to be coded for each proc/insert
• Cold Fusion
– Server side (not fast)
– Generic?? Not really
• Other Options?
Solution….
• Client Side Solution using JavaScript
• Generic in Nature
• Browser insensitive (as much as possible)
Advantages
•
•
•
•
•
•
•
•
Save Server Resources
Save Network Resources
Save Database Processing etc.
Works on Multiple Forms On a Page
Knows what elements have changed
Works for ALL Form elements
Little Jscript knowledge required
Can prevent user from leaving page when form value
has changed (IE Only)
• Your boss will think you’re a Genius!
Disadvantages
• Multiple Forms are treated as a single
entity (in this version of the tag)
• Browser Version Issues Possibly (test your
user browser base)
Browser Preview
• MSIE
• FireBird 0.7 !! (Mozilla
Browser)
Code Walk Though
• FinalCheck() function
• DoUnload() function (MSIE Only)
• Protect Your Source Code!
• (Script Encoder from Microsoft)
Links / References
• CF_FormSave Tag -
http://commark.com/formsave/
• Microsoft Script Encoder
• FireBird Browser www.mozilla.org/firebird
Questions?
Thank You!