Bookshelf Home | Contents | Index | PDF |
Siebel Applications Administration Guide > Signature Capture > Process of Creating an Applet for Signature Capture > Adding Browser Script to the AppletTo access the ActiveX control, and to execute methods as required, you must add browser script to the applet. This task is a step in Process of Creating an Applet for Signature Capture. To add browser script to the applet
Example Applet_Load EventThe following example code retrieves the data for the current record, and displays the data in the signature control applet when the applet is loaded: //when the applet loads check the BC field value //and use it to set the signature control value //control is clear by default so no call to clear here inPS = TheApplication().NewPropertySet(); sigVal = this.BusComp().GetFieldValue("AA Signature"); inPS.SetProperty("InkVal", sigVal); iResult = this.InvokeMethod("SetInk", inPS); Example Applet_ChangeRecord EventThe following example code updates the data in the signature capture control when that data changes, for example, when a new record is selected: function Applet_ChangeRecord () //when the BC record changes then check the BC field value //and use it to set the signature control value //or clear the signature control value inPS = TheApplication().NewPropertySet(); sigVal = this.BusComp().GetFieldValue("AA Signature"); inPS.SetProperty("InkVal", sigVal); iResult = this.InvokeMethod("SetInk", inPS); iResult = this.InvokeMethod("ClearInk", inPS); Example Applet_PreInvokeMethod EventThe following example code manages the logic for the buttons and for the other scripts: function Applet_PreInvokeMethod (name, inputPropSet) //code to store signature value //get the signature aX control myOcx = this.FindActiveXControl("CICInk"); alert ("the error is "+ e.toString()); alert ("the message is "+e.message); //code to get the value in the control //and then write it in the BC field objBC.SetFieldValue("AA Signature", lnInk.toString()); //code to clear the signature control value axCntl = this.FindActiveXControl("CICInk"); //code to set the signature control value //InkVal comes from applet_load and applet_changerecord strInk = inputPropSet.GetProperty("InkVal"); axCntl2 = this.FindActiveXControl("CICInk"); alert ("the error is "+ e.toString()); |
Siebel Applications Administration Guide | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |