Featured Post

Hacking Health in Hamilton Ontario - Let's hear that pitch!

What compelled me to register for a weekend Health Hackathon? Anyway, I could soon be up to my ears in it. A pubmed search on Health Hack...

Monday, March 10, 2014

Autosave with Coldfusion and CKEditor

Autosave is an essential feature for online forms. Web-based EMR or PHR systems should probably have it for physician and other administration notes. I would say it would probably be an essential service to have as a default, with no other option. Well, having an option to save and store regular drafts of the text would be great, and which could be deleted when the text is finally saved or submitted. The next best feature to have would be a system that regularly stores versions of the text input into a form or page. You have probably noticed autosave functions in current email systems like Gmail, and I think some word processing applications have them as a feature, but maybe not a default feature. Gmail stores draft versions regularly. Very useful to have.

From my experience with a Coldfusion application that uses CKEditor, there is nothing worse than having a user loose 2 hours of textual notes, especially on a system that times-out after one hour. The forms I developed have a manual save button and a button to submit the data to be saved. The latter function just sends email confirmations. CKEditor does have a plugin for autosave, and I have tested it, but was not happy with the way it notified about reloading saved data. I upgraded to a higher version of CKEditor and the autosave plugin, but now it doesn't work at all, so I am twice as unhappy (: (:

So there are programming alternatives to autosave without CKEditor and I have tried several (like the dynamic drive one) and they are just not working. The most promising one I have tried is a coldfusion demo version from a coldfusion tutorial. I tried this demo on my coldfusion server and the demo version works but when I program it into my coldfusion pages - nothing. The downside of that is that it doesn't look like it integrates well with CKEditor. You know the autosave works if you type some text into a comment box and do a page refresh and the text doesn't disappear.

Another promising one looked like Sisyphus which integrates into the javascript for the CKEditor. Even though the developer of Sisyphus was very kind to answer my emails, I still have not been able to get it work. This is going to be one of those trial and error experiments that I will have to return to many more times before, almost by chance,  I get it to finally work.




No comments:

Post a Comment