October 17, 2018, 04:46 PM
WazTechsupport time ?
October 18, 2018, 04:00 AM
Wep5622Your javascript has to be started from some HTML page, which in turn needs to get started by something.
If that something is a fex that uses -HTMLFORM my.html, then you can embed a javascript assignment in that HTML that sets a global variable using !IBI.AMP.
my.html would then look something like this:
<html>
<head>
...
<script type="text/javascript">
var ibiVersion = { gen: "!IBI.AMP.GEN;", release: "!IBI.AMP.RELEASE;" };
</script>
....
And now you have a global Javascript variable with your version information.
Now that approach is hardly convenient if you need to add it to each and every HTML page, of course.
Easier is to write the output of these variables to, for example, a JSON file on a fixed location on the server (say /approot/baseapp/ibiVersion.json) and fetch that to obtain your info.
October 18, 2018, 11:51 AM
David Briarsquote:
...how would I call this...
No, the code I show isn't something you would call.
It was a simple model, of what I thought you were doing, and how you could incorporate gen/release numbers.
It sounded like you have a fex that has an -HTMLFORM.
And the JavaScript code in the -HTMLFORM calls other fexes via creating a URL.
And you need that code to create the URL back to WF dynamically based upon the release of WebFOCUS.
So, my model shows, before the -HTMLFORM you would gather the release number into an amper variable.
Then embed the amper variable in the JavaScript section.
Then your JavaScript can make decisions based upon the value of the amper, such as, the value of the URL.