Insert html to memo body by pressing action button

Hi,

in our dwa7.ntf (Notes view) we have action buttons to insert 2 different signatures (for internal and external use) in the memo’s body.

Now we want the same function in DWA. With the help of the “DWA 7 customization” Redpaper I’ve created a new button in the memo window. Now I need a JavaScript funktion to insert our html signatures, which is stored in the user’s nsf, into the memo’s body.

I’m very appreciate for any proposal

Subject: Insert html to memo body by pressing action button

Hi again!

I’m on my way to the solution but I still have a problem. But first my function I’ve inserted in the custom_js form of the Forms7.nsf:

function addSignature(sigType) {

var browser=navigator.appName;

var sig = '@{{@DbLookup( "Notes" : "NoCache" ; "devmdomms01/dems" : "iNotes\\user.nsf" ; "vsignature" ; "1" ; "signature" )};jsdata}';

var dis = '@{{@DbLookup( "Notes" : "NoCache" ; "devmdomms01/dems" : "iNotes\\Forms7.nsf" ; "vdisclaimer" ; "1" ; "disclaimer" )};jsdata}';

		

if (sigType=="e"){

	sig = sig + dis;

}

	

if (browser=="Microsoft Internet Explorer"){

	var c = document.getElementById("HaikuEditorBody").innerHTML;

	document.getElementById("HaikuEditorBody").innerHTML = c + sig;

}



else{

	var c = document.getElementById("HaikuEditorBody").contentDocument.body.innerHTML;

	document.getElementById("HaikuEditorBody").contentDocument.body.innerHTML = c + sig;

}

}

With this function I’m able to insert html in the memo’s rich text field. It works with IE, Firefox & Opera.

But the html code I want to use is stored as field in a Notesform.

So I use @Dbookup() to get the fiel’s value and in Notes the formula works fine.

But in DWA nothing happen. I can’t find anywhere that this formula is not supported in web application.

Knows anyone the right or a different way to access to a NotesDB via JavaScript?