Highlighted
Super Contributor.
Super Contributor.
223 views

where to find acutoweb example code for signature capture?

Jump to solution

Hi everyone.

The recent online webinar about the 10.3.0 release had a section where they showed off the new ability to insert javascript functionality.  As an example, they showed a signature capture function.  I reviewed the 10.3.0 documentation for AcuToWeb and could not find references for how to use the new javascript functionality - ie how to trigger it from cobol and/or how to capture the result of the javascript - ie how to get the signature that was just captured.  So I was hoping to review the code from that webinar example.  A quick look did not show where they might have stashed it on the website.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: where to find acutoweb example code for signature capture?

Jump to solution

Attached is the example.

1.- Unzip the file to a folder.

2.- Inside the zip there is another zip : brinley-jSignature-600b91a.zip

3.- Unzip brinley-jSignature-600b91a.zip into the following folder : C:\Program Files (x86)\Micro Focus\extend 10.3.0\AcuToWeb\Web\js\libs  (Depending on your installation)

4.- Add to the gateway.con file (AcuToWeb configuration file) a line like this :

PATH_CUSTOM_JS C:\Work\Project\signature-demo\signature.js  .. It has to point to the location of the signature.js file contained in the zip.

5.- The Signature_clean zip contains an altered gridctl.cbl, compile it and then create an alias for the gridctl program.

6.- execute the alias via AcuToWeb.

7, Use the Frame push button, then use the Get Signature button.

View solution in original post

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: where to find acutoweb example code for signature capture?

Jump to solution

I wasn't involved in the webinar so I do not have access to the signature code. The use of JavaScript in 10.3 is a new AcuToWeb configuration variable PATH_CUSTOM_JS provides the ability to load your own
Javascript file into the head of the host page.

Hopefully someone involved in the Webinar will provide more insight into the signature example.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: where to find acutoweb example code for signature capture?

Jump to solution

Attached is the example.

1.- Unzip the file to a folder.

2.- Inside the zip there is another zip : brinley-jSignature-600b91a.zip

3.- Unzip brinley-jSignature-600b91a.zip into the following folder : C:\Program Files (x86)\Micro Focus\extend 10.3.0\AcuToWeb\Web\js\libs  (Depending on your installation)

4.- Add to the gateway.con file (AcuToWeb configuration file) a line like this :

PATH_CUSTOM_JS C:\Work\Project\signature-demo\signature.js  .. It has to point to the location of the signature.js file contained in the zip.

5.- The Signature_clean zip contains an altered gridctl.cbl, compile it and then create an alias for the gridctl program.

6.- execute the alias via AcuToWeb.

7, Use the Frame push button, then use the Get Signature button.

View solution in original post

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: where to find acutoweb example code for signature capture?

Jump to solution

Anyone interested should know that my web guy took a little fiddling to get it set up, but it worked.  We were then able to expand the "watching loop" to look for other fields too.  We were able to set up  system whereby the cobol program can use javascript routines to set/get cookies.

1. Set up setcookie routine that launches when loop sees an object with CSS-ID of "ssi_set_cookie".

2. That routine looks for text field "ssi_cookiename" and gets the value, then looks for text field "ssi_cookievalue" and gets that value, then sets the cookie.

3. Set up getcookie routine that launches when loop sees an object with CSS-ID of "ssi_get_cookie".

4. That routine looks for text field with name "ssi_cookiename" gets the value of that cookie, then puts that value into text field "ssi_cookievalue".

5. The cobol program has to wait a bit after creatting the trigger fields, but it can know when things are done because the value of "ssi_cookievalue" changes.  The set routine clears it and the get routine fills it.

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: where to find acutoweb example code for signature capture?

Jump to solution

Final comment - The acutoweb manual, the one in the windows help file (and the online html) has no hints about how to use the new javascript feature, just explains that it's there and where to put your javascript code.   I think there ought to be something, perhaps a link to a sample program like the signature function, for those who are not javascript experts, they just know a bit.  That's my opinion anyway.   And I thought I would provide an overview of what worked for us in my previous post.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.