Manage Learn to apply best practices and optimize your operations.

Delete With Confirmation

When an user clicks the delete button image, he/she will get a confirmation
message "Do you really want to delete this document?". If the user click Yes,
the document will be deleted; No, message box goes away without any action.

Required a delete agent and a delete button image.
1) Add a field called "$$HTMLHead" in the document form. $$HTMLHead field is
text, hidden, and computed for display with value equal the following:

UNID:=@Text(@DocumentUniqueID );
"&LTSCRIPT LANGUAGE=\"JavaScript\"> "+@NewLine+
"function deleteDoc(form) { "+@NewLine+
"if (confirm(\"Do you really want to delete this document? Click \'OK\' to
delete or \'Cancel\' to abort\")) "+@NewLine+
" {
top.location.assign(\""+"/dir/dbname.nsf/WebDelete?OpenAgent&"+UNID+"\")" +
" } }</Script>"


dir is your directory after your Notes/Data directory

dbnames.nsf is the database file name

WebDelete is the agent performing the deletion

2) Add a field called "DeleteImage" in the document form. DeleteImage field is
text, not hidden, and computed for display with value equal the following:

"[&LTA HREF=\'javascript:deleteDoc(this.form)\'>&LTIMG SRC=\"deleteimage.jpg\"


deleteimage.jpg is the location of your deletion image.

This was last published in November 2000

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...