Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Entries

photo

Painless upgrade to ...

Blog:  Write it on a...
David Jones
Updated 
No Ratings 0     Comments 1
photo

Re: Installing Serve...

Blog:  Smith's State...
Peter Smith
Updated 
No Ratings 0     No Comments 0
photo

Installing Servers u...

Blog:  Smith's State...
Peter Smith
Updated 
No Ratings 0     Comments 2
photo

WRKDOMSVR Tricks

Blog:  Domino Diva
Kim Greene
Updated 
No Ratings 0     No Comments 0
photo

Netbackup 6.5.x Bug ...

Blog:  Dan Lynch's B...
Dan Lynch
Updated 
No Ratings 0     No Comments 0

Dogear Bookmarks

Yellow is the New Blog

Blog Authors:  Tim Tripcony  

Previous |  Main  | Next

Create, edit and delete without agents

Tim Tripcony  |     |  Tags:  domino ajax sntt  |  Comments (0)
I'm really becoming a broken record, eh? Or, for you kids in the audience, a degraded MP3 file. By request, I put together a full demonstration of how documents can be created, edited, and deleted using AJAX, all without the use of any agents. You can try it out here. And you can download the demo database here.

Previously, I described how documents can be created and edited in a Domino database without calling agents. This demo combines the two - as well as deletion of documents - using a simple contact manager as an example. The UI is very primitive, but hopefully it illustrates the premise.

In this example, contact information can be entered and then posted to the server without a page refresh. The function that posts the document (thereby creating a new record in the database) in turn calls the function that loads the view data (thereby displaying the newly created record). The new data could of course be inserted into the table immediately instead of reloading the view, but this approach was intended to illustrate how much faster document creation is when agents aren't involved. Reloading the view also ensures that the new record will already be sorted correctly when it's added to the table. In addition to document creation, each view row includes a link to allow editing and deletion of existing documents.

Please feel free to post any questions or suggestions you may have about this... I was planning to write up a far more detailed explanation of how all of this is tied together, but I'm suddenly very sleepy.

Oh, one thing I should mention: the reference to Event.onDOMReady at the end of ajaxeditor.js isn't part of the core prototype.js. It's an extension I found on Vivabit. This allows functions to be defined in external js files that would otherwise need to be called inline or via window.onload... for example, functions that you want to run immediately, but not until some DOM element that the function is going to muck with is actually ready to receive said mucking. The primary advantage of this extension is that it triggers the functions as soon as it is safe to do so, instead of waiting for the entire page to load (images, for example).

(cross-posted from TimTripcony.com)

Comments

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.