Focal Point
[CLOSED] using java script in app studio

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8647024686

May 15, 2017, 11:51 AM
Al_C
[CLOSED] using java script in app studio
I have a button that runs a report that refreshes the dataset behind an active html page.
The refresh takes a few minutes to run, and i would like to either

a> change the verbiage on the button that runs the refresh from "refresh data" to "refreshing" (maybe blinking in red?)
and then changing back when the refresh completes
or
b> changing the actual report frame from hidden to visibel and back to hidden when the refresh finishes

on-line help warns not to "use custom java on html canvas created objects"

has anyone tried something like this?
are the java "methods" the same as the ones we use in dev studio" (ie getelementbyid.attribute=value?)

are only the "canned" options available for use in app studio?

is there a reference somewhere to get more (any) information on using jave in app studio?

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


WebFOCUS 7.6.9
Windows
all output (Excel, HTML, PDF)
May 16, 2017, 05:53 AM
Wep5622
Does the online help really warn not to use custom Java, or are you misquoting and it actually says Javascript?

Custom Java in HTML is done using Java Applets, a technology that many modern browsers stopped supporting.

Javascript OTOH, can be used safely on HTML canvas created objects. An old version of JQuery comes pre-loaded (as it's used internally by IBI). You can include your own external js files or code directly in the Javascript tab (but I suggest you keep that to a minimum, the built-in javascript editor is IMO not production-ready).

We use javascript extensively in our HTML pages, whether they were created using HTML canvas or written by hand.


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 :
May 18, 2017, 01:29 PM
BarryS
Hi Al

You can use chaning to run a procedure to load another control. The Proceedure will run a table request and HOLD the file for populating reports then write the following code below the HOLD file:

-SET &NoOfRows = &LINES;

DEFINE FILE CAR
ROWS/I9 = &NoOfRows;
END
TABLE FILE CAR
SUM MAX.ROWS
BY COUNTRY
WHERE RECORDLIMIT LE 1;
ON TABLE HOLD FOORMAT XML
END

Now you can chain this control to other controls and hide them until the value is GT 0

or in thee case of a button you can make it visible once there is a value GT 0 in the control.

This is fairly complex so if any assistance is needed open a case and ask for Barry...


WebFOCUS 8103, Windows, App Studio