我正在更新forms9_x.nsf数据库,以模仿我们为Notes客户端定制的一些功能。我在e-actions-mailedit menuid(新备忘录)中添加了一个操作按钮,它将一个值附加到Subject字段,然后发送新的备忘录。我已经对该主题的更新工作正常,但不知道如何发送备忘录。我尝试过xxForm.submit(),但收到错误信息。以下是我在Custom_JS_Lite中的代码:
function SendEncrypted(sId)
{
var answer = confirm("This memo will be sent in encrypted format to everyone listed in the To, CC and BCC fields. " +
"Are you sure this is what you want to do?");
var x;
if(answer == true){
alert("Yes, please encrypt");
// Get the current backend document ID
var oPanelManager = AAA.Fkb();
var sContentID = oPanelManager.EdI.get('T').oPrev.sId;
// Get the current UI document
var oMainDoc = AAA.EcK;
var subj = oMainDoc.getElementById('e-' + sContentID + '-subject').value;
oMainDoc.getElementById('e-' + sContentID + '-subject').value = "[encrypted] " + subj;
var newsubj = oMainDoc.getElementById('e-' + sContentID + '-subject').value;
alert("The new subject is " + newsubj);
var oForm = oMainDoc.getElementById('e-pageui-' + sContentID);
//oForm['tmpSendOptions'].value = "1"
oForm.Submit();
alert("Document submitted"); }
else{
alert("The answer is cancel");}
return;}
非常感谢任何帮助。
桑德拉
答案 0 :(得分:-1)
oForm.submit(); // the submit method of the FORM object is lower case, your code shows ".**S**ubmit()"
// this should evaluate to the FORM object.
var oForm = oMainDoc.getElementById('e-pageui-' + sContentID);
// Does this display a value?
window.alert( oForm.Subject.value );