I know this is an old thread, but if anyone's interested, I got this code to work in JScript (Where bName is a string containing the name of the data block that contains the signature you want to delete):
function removeSignature(bName){
var oSignaturesCollection = XDocument.SignedDataBlocks[bName].Signatures;
var iCountOfSignatures = oSignaturesCollection.Count;
if(iCountOfSignatures <= 0)
return;
var oSignatureNode = oSignaturesCollection(0).SignatureBlockXmlNode;
if(null == oSignatureNode)
return;
oSignatureNode.parentNode.removeChild(oSignatureNode);
}
The only hitch is that when you delete the signature block, the little "Click here to sign" text doesn't reappear until you reopen the form. For my purposes this is fine becuase I'm clearing the signature before I submit the form to someone else via email, but if someone needed to clear the signature field, then have someone sign that field, this could be a problem.