I already discussed this request with Alex months ago. He advised me a way on which i find a severe issue.
What's the need?
Sometimes we would perform some operations, calculations (not possible with CSPro logic functions) using some javascript libraries and transfer results to CSPro logic. Right now, it's possible with HTMLDialog, but this require to open a HTML page and come back to CSEntry. However, sometimes, we would like to perform theses calculations/operations in the background. And, since we always have an active webview displaying CAPI, i'm asking myself if i can't run javascript inside it and retrieve results to CSPro logic. Alex advised me to display a HTML pages with nothing (no UI) in the body part but only javascript codes.
Code: Select all
<!doctype html>
<html lang="en">
<head>
<script>
//Calling javascript and closing dialog on callback
</script>
</head>
<body>
<!--Nothing here-->
</body>
</html>
So, i'm asking if you don't have any workaround for using the CAPI Webview part to run Javascript and transfert results in logic?
Note that, in the help, i can read
JavaScript Interface
A JavaScript interface exists to facilitate the invocation of user-defined functions from question text. This feature allows advanced users to take advantage of the power of JavaScript to allow some interaction between question text and CSPro logic.
But, i can't find more explanations on if it's possible of using the CAPI part for my need.
Thanks in advance for your support!