Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Javascript Method to get WF Version
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Javascript Method to get WF Version
 Login/Join
 
Master
posted
Is there a method that IBI provides in javascript to get the current version of WebFOCUS.

This message has been edited. Last edited by: FP Mod Chuck,




Scott

 
Posts: 862 | Registered: May 24, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Scott

I don't know about a javascript method but in a fex you can use ? GEN and it will provide that info.

EDA8100 Release * Current Software:
EDA8100 Release RELEASE = M728100D
EDA8100 Release GEN_NUM = 902
EDA8100 Release SOURCE_DATE = 07/06/2016 18:04:45
EDA8100 Release BUILD_DATE = 07/06/2016 20:30:45
EDA8100 Release INSTALLATION_DATE = 9/24/2016 16:36:26


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1571 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Need as javascript method to be used so that the an AJAX call can create the correct URL as the URL to call a fex is different between 80x and 82x.




Scott

 
Posts: 862 | Registered: May 24, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Not sure what version you are on, but these calls seem to give you the client version.

A bit of ajax and js to work out if the the call exists and pull the version.

8.1.04: /ibi_apps/console/wfinformationpage.jsp

8.2.04: /ibi_apps/tools/console/resources/markup/console_properties.jsp

Although, there must be a better way.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6105 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
Will either of these help?
  
-TYPE &|FOCGEN: &FOCGEN
-TYPE &|FOCREL: &FOCREL


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 431 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Originally posted by TexasStingray:
Need as javascript method to be used so that the an AJAX call can create the correct URL as the URL to call a fex is different between 80x and 82x.


Different? I think we're in the same boat then...
Could you elaborate on that?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1643 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
Master
posted Hide Post
So let me explain what I am doing. We are making call to WebFOCUS via AJAX to execute procedures and to change things on the screen mainly images that are in the repostory.
In 80xx the url looks something like this.
ibi_apps/WFServlet/views.bip?BIP_REQUEST_TYPE=BIP_RUN

In 82xx the url needs to look something like this.
ibi_apps/WFServlet/run.bip?BIP_REQUEST_TYPE=BIP_LAUNCH

As you can see
  • views.bip is being replaced with run.bip
  • BIP_RUN is being replaced with BIP_LAUNCH

So what am plainning is creating my own javascript class that will return the correct values based own what version of WebFOCUS is being used.




Scott

 
Posts: 862 | Registered: May 24, 2004Reply With QuoteReport This Post
Master
posted Hide Post
quote:
...in javascript to get the current version of WebFOCUS.

The following code..
-* Do something.  
-SET &RELEASE = &FOCREL;
-SET &GEN = &FOCGEN;
-* Show something to the user.  
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<body>
<script>
 document.write("WF Gen/Release !IBI.AMP.GEN;/!IBI.AMP.RELEASE;");
</script>
</body>
</html>
-HTMLFORM END  

..results in the following browser window:
WF Gen/Release 915/M728100D  

This message has been edited. Last edited by: David Briars,
 
Posts: 761 | Registered: April 23, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Or, how about a ajax call to see if the URL call works, the return the that URL as the base call.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6105 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Master
posted Hide Post
quote:
Originally posted by David Briars:
quote:
...in javascript to get the current version of WebFOCUS.

The following code..
-* Do something.  
-SET &RELEASE = &FOCREL;
-SET &GEN = &FOCGEN;
-* Show something to the user.  
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<body>
<script>
 document.write("WF Gen/Release !IBI.AMP.GEN;/!IBI.AMP.RELEASE;");
</script>
</body>
</html>
-HTMLFORM END  

..results in the following browser window:
WF Gen/Release 915/M728100D  


And how would I call this if I do not knwo what the url should be?




Scott

 
Posts: 862 | Registered: May 24, 2004Reply With QuoteReport This Post
Master
posted Hide Post
quote:
Originally posted by Waz:
Or, how about a ajax call to see if the URL call works, the return the that URL as the base call.


That may me an option but there has to be a simpler way.




Scott

 
Posts: 862 | Registered: May 24, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Techsupport time ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6105 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Your 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.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1643 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
Master
posted Hide Post
quote:
...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.
 
Posts: 761 | Registered: April 23, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Javascript Method to get WF Version

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.