This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jan 21, 2013, 11:30 PM
12 Posts

alert from SSJS

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.1
  • Role: Developer
  • Tags:
  • Replies: 1
 
 Hello,
 
I have a view with checkboxes and a button on a xpage. I would like provide an alert when a user clicks on the button with out selecting a document from the view panel. Could any one provide an example on how to achieve this?
 
Here is my code. I am using 8.5.1
 
var viewPanel=getComponent("viewPanel1");//get the componet of viewPanel
var docIDArray=viewPanel.getSelectedIds(); //get the array of document ids
if (docIDArray.length != 0){
for(i=0;
i < docIDArray.length;
i++){
var docId=docIDArray[i];
var doc:NotesDocument =database.getDocumentByID(docId);

doc.replaceItemValue("BoxNumber",getComponent("boxID1").getValue());
doc.replaceItemValue("TrackingNumber",getComponent("trackNumber1").getValue());
doc.replaceItemValue("ItemStatus","Completed");
doc.save()
return true;
}
} else {
 need to add an alert here
return false;

}
 
Thanks in advance,
 
Ven

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal