randy.stephenson

Determining when last Form has been signed in an IFrame

0 votes

In our current (pre 11.42) implementation, we are presenting forms in an iframe, and incrementing a counter in JavaScript, which will also forward to different page when all forms have been signed.    

 <iframe src="${application.silanisURLwithSessionToken}" id="myFrame" onLoad="incrimentOnLoad();" >
                                </iframe>

We in post-signing process we persist the forms and display link to the package on our own page.

I'm seeing that the CONFIRM button trigger that JS anymore and we remain on the Review Your Docs page.

Can you suggest a different way to handle this?


Reply to: Determining when last Form has been signed in an IFrame

0 votes

Hi Randy,

 

Before we go any further, not sure if you have already worked on the New Signer Experience - the Classic Signing Ceremony is now deprecated and all accounts will be moved to the New User Experience since release 11.42.

Back to the topic, it seems your application is counting the on-load events and forwarding the signing ceremony when certain number of documents have been signed and reloaded. This probably won't work with the New Signer Experience because the NSE now won't reload itself. 

Instead, when the Signing Ceremony is embedded in an iFrame, it sends notifications to your parent window when specific actions are triggered. By registering a Javascript Event Notifier and listening for the posted messages, your application knows when certain events has occurred and can react accordingly. Please read thoroughly about the highlighted guide and for your reference, a basic event notifier looks like below:

window.addEventListener('message', receiveMessage, false);
function receiveMessage(event) {
      var origin = event.origin || event.originalEvent.origin;
      var data = event.data;
      console.log(data, origin);
 
      switch (data) {
            case 'ESL:MESSAGE:REGISTER':
                  event.source.postMessage('ESL:MESSAGE:ACTIVATE_EVENTS', origin);
                  break;

            case 'ESL:MESSAGE:SUCCESS:SIGNER_COMPLETE ':
                event.source.postMessage(data, origin);
                window.location.href = "https://www.example.com"; //redirect page
                break;
            default:
                  event.source.postMessage(data, origin)
                  break;
      }
}

 

Duo

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Determining when last Form has been signed in an IFrame

0 votes

Thanks Duo. 

Release 11.42 is the reason I am doing sandbox testing. On the subject, I want to make sure my assumptions are correct.

Is the behavior we see using the sandbox, what we will see in US1 Production apps.e-signlive.com when 11.42 goes live on July 6th?

If we test successfully with the sandbox, is that confirmation that our code will work when the release occurs?

 

Also, thank you for that code.

 

Randy


Reply to:

0 votes

Hi Randy,

 

I would suggest you make code changes and fully test on the sandbox environment, then contact the support team ([email protected]) to turn on the New Signer Experience and potentially migrate all the customization or setting changes to your production account before the release occurs. 

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off