Running Javascript as JSHeader on iNotes Client using IBM Domino Designer for EMail Application

StackOverflow https://stackoverflow.com/questions/23345398

문제

I created a subform with a simple link hotspot in IBM Domino Designer. The link simply calls a function that adds a signature to the message being edited.

Inserting this subform on a web form (wMemo) works fine. When I added the subform to the Message form, which runs under iNotes and not under a Web browser, iNotes complaines about not being able to find the function.

The application is derived from the Mail template. The javascript function:

function InsertSignature(){
    var body = document.getElementById("wBody");
    body.value += "Signature";  
}

I added the function in the JS-Header section of the subform. I assumed that any code written here will be loaded as a part of the header of the page, the same as in a normal form. The error I am getting says:

RegerenceError: InsertSignature not defined.

I added the function to the JS-Header of the parent form, but this didn't help either.

Any idea how to interact with the GUI-Elements on an iNotes page?

I want to modefy existing Mail application, so I don't have much choise!

도움이 되었습니까?

해결책

iNotes customization does not have much to do with forms and subforms. Almost the complete code for iNotes comes from the iNotes\FormsXX.nsf that comes with your Version of Domino.

Customize iNotes mostly is editing JavaScript- Code within Forms / Subforms of this Formsxx.nsf.

Use this link as a starting point or google for "iNotes Customization"

Best practice is to use a forms_x.nsf (this time the x in the name is not a placeholder, but the real name of the database) to hold your custom code, but all of that can be read following the above link.

Just remember: customizing iNotes does not have much to do with "classic" Notes development.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top