Remove Signature - InfoPath Dev
in

InfoPath Dev

Remove Signature

Last post 06-07-2010 01:22 PM by mgarant. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-07-2010 10:48 AM

    Remove Signature

    Hi-

    I am trying to remove the signatures in the back end once a button it clicked  I was able to locate 2 examples on here, but I am having trouble deploying them.  I am able to get the 2nd one to look correct, but am unable to call the function.  I am also getting an "End of statement expected." error on the first line "function removeSignature(bName){"  where bname = name space.  Thanks.

     

     SignaturesCollection oSignaturesCollection = thisXDocument.SignedDataBlocks["Actions"];
    int iCountOfSignatures = oSignaturesCollection.Count;
    if(iCountOfSignatures <= 0)
    {
    return;
    }

    IXMLDOMNode oSignatureNode = oSignedDataBlock.Signatures[0].SignatureBlockXmlNode;
    if(null == oSignatureNode)
    {
    return;
    }
    oSignatureNode.parentNode.removeChild(oSignatureNode);

     and

     

    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); 

    }

  • 06-07-2010 01:22 PM In reply to

    for the error, in your function declaration, you need to write the type of the variable

     Ex :

    function removeSignature(string bName){

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.