Add JavaScript to clear the contents of a signature control.
Use the Hybrid App Generation wizard to
generate the Hybrid App package and its files.
When the Hybrid App package is generated, the
Custom.js file is generated if not already present in the
project. The Custom.js file is located in Generated
Hybrid App\<project_name\html\js.
Open the Custom.js file and add your JavaScript
code to the click event of a menu or button.
For
example:
function customAfterMenuItemClick(screen, menuItem) {
if (menuItem === "Clear_Signature") {
$.data(document.getElementById('sigKey'), 'signature').clearSignature();
}
}
Save and close the Custom.js file.
Re-generate the Hybrid App
package and deploy it to SAP Mobile Server.