Your Development & Design Resource

NotesDocument Auto-Save Online Demo

For those of you who don't follow me on twitter or are one of connections on facebook, you may have missed my call to test out my NotesDocument Auto-Save Online Demo:

While I'm taking the family to Go-Karts, check out my Online Domino NotesDocument AutoSave Demo @ (just play nicely)!

Those beta testers (thanks gang!) confirmed that it's working like a charm... but I wanted to broaden the test group (as well as give you a live demo of a fairly basic but pretty slick Auto-Save feature that you can easily add into your existing Domino Web Applications.

NotesDocument Auto-Save Online Demo with Firebug Console

The concept is pretty basic: When enabled on a new NotesDocument, the Auto-Save is triggered every 5 seconds. The Auto-Save submits the uidoc (go with me here...) via an AJAX-based HTTP Post - if it hasn't been saved yet, it submits to temp?CreateDocument, otherwise it submits to 0/<NotesDocument Unique ID>?SaveDocument. Post-submission, the AJAX POST returns the submitted NotesDocument Unique ID to a field on the HTML Form element named UNID (and that's you-nid btw...).

When you actually attempt to submit the HTML Form, it checks the UNID HTML field. If it's blank, it submits to document?CreateDocument, otherwise it submits to documents/<Value of the UNID HTML Field>?SaveDocument. (There's a Form Formula on the documents View Design Element that handles the submission. Same goes for the Auto-Save; it first checks the UNID before it submits - hence the @IsNewDoc-like functionality.

The reason why I went with this approach will be clear once the article is published... which will be soon after I return from vacation. Said article, and the downloadable example NotesDatabase, will be available on the Lotus Domino Designer Wiki.

About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.

More from is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.