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 );
"<SCRIPT 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+"\")" +
@NewLine+
" } }</Script>"
where
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:
"[<A HREF=\'javascript:deleteDoc(this.form)\'><IMG SRC=\"deleteimage.jpg\"
border=0></A>]"
where
deleteimage.jpg is the location
Requires Free Membership to View
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
This was first published in November 2000