I have a custom control, which creates a PDF when you click it's button.
At the end of that script, I want to click another button that's on the Xpage, just as you would using CSJS.
This is the script used on the SSJS button.
var pdfData = compositeData.get("pdfData");
if (compositeData.pdfRenderType.toString() == "OutputStream") {
exportPdfOutputStream(pdfData, compositeData.templatePdfName);
} else {
var returnValue = exportPdfFile(pdfData, compositeData.templatePdfName, compositeData.targetFilename);
if (compositeData.redirectPage != null) {
context.redirectToPage(compositeData.redirectPage);
}
}
Is there anything I can add to this code get then click the other button whose name and ID is "SaveButton"?
What is the equivalent of document.getElementtById('SaveButton').click() OR document.forms[0].SaveButton.click() when using CSJS?