You will love this solution. Your code works for the most part. But I did some research and found the signature kicks off at 'enter' event not 'click' though it appears to happen at 'click'. Added and additional text field with name 'TextField1' to the design and add following code to enter event of Text Field.
SignatureField1.access = "open";
and then updated your JavaScript code to following and used in 'ENTER' event NOT in 'CLICK' event. Clear any code you have in click event.
var nButton = app.alert({cMsg: "You are signing that you have read and understand the contents of this document",
cTitle: "Electronic Signature Confirmation",
nIcon: 2,
nType: 2});
if ( nButton != 4 ) {
SignatureField1.access = "protected";
xfa.host.setFocus("TextField1");
}
I have tested this and hope it resolves your issue. If you need sample do specify your email ID.
Good Luck,
SekharN
www.lawson.com