This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
integration-api:example [2018/08/21 15:09] tjotov |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Web Integration API - Example ====== | ||
| - | |||
| - | |||
| - | < | ||
| - | var aducid = new ADUCID(); | ||
| - | $(document).ready(function() { | ||
| - | aducid.setAuthentication(); | ||
| - | aducid.setStartOperationUrl("/ | ||
| - | aducid.setResultOperationUrl("/ | ||
| - | aducid.setProxyUrl("/ | ||
| - | aducid.setRedirectUrl("/ | ||
| - | aducid.processResult = function(result) { | ||
| - | if (result.status == " | ||
| - | alert(" | ||
| - | location.href = result.redirect; | ||
| - | } | ||
| - | else { | ||
| - | alert(" | ||
| - | location.href = result.redirect; | ||
| - | } | ||
| - | } | ||
| - | |||
| - | //handle PEIG not installed error | ||
| - | aducid.showPeigError = function() { | ||
| - | alert(" | ||
| - | } | ||
| - | |||
| - | //handle communication or other error | ||
| - | aducid.handleError = function(e) { | ||
| - | alert(e.data.message); | ||
| - | } | ||
| - | |||
| - | aducid.showQRHint = function(param) { | ||
| - | $('# | ||
| - | } | ||
| - | |||
| - | aducid.showRunningHint = function(param) { | ||
| - | $('# | ||
| - | }; | ||
| - | |||
| - | //GUI mapping | ||
| - | aducid.setButton($("# | ||
| - | aducid.setQrCode($("# | ||
| - | aducid.setQrHint($("# | ||
| - | |||
| - | //start | ||
| - | aducid.init(); | ||
| - | }); | ||
| - | </ | ||
| - | </ | ||
| - | < | ||
| - | |||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | <img id=" | ||
| - | <div id=" | ||
| - | |||
| - | </ | ||
| - | </ | ||
| - | |||