Focal Point
[SOLVED] Drilldown to multiple iframes

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

February 17, 2015, 05:43 PM
Joel Elscott
[SOLVED] Drilldown to multiple iframes
Is it possible to drill down to multiple iframes? i.e. the user clicks on a pie slice from iframe1, which triggers a chart in iframe3 and a report in iframe4?

Here is my code so far, but it's only drilling to iframe4:

TYPE=DATA, COLUMN=N3, TARGET='iframe3', FOCEXEC=fex1.fex(ERRTEAM=ERRLVL1.ERRLVL1.PEN_TEAM_NM), $
TYPE=DATA, COLUMN=N3, TARGET='iframe4', FOCEXEC=fex2.fex(ERRTEAM=ERRLVL1.ERRLVL1.PEN_TEAM_NM), $

  
Full code if you need it:
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
GRAPH FILE ERRLVL1
-* Created by Info Assist for Graph
SUM ERRLVL1.ERRLVL1.ERROR_COUNT AS 'Errors by Team'
BY TOTAL HIGHEST ERRLVL1.ERRLVL1.ERROR_COUNT NOPRINT
BY ERRLVL1.ERRLVL1.PEN_TEAM_NM
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH PIEMULTI
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setPieFeelerTextDisplay(1);
*END
INCLUDE=IBFS:/WFC/Repository/RIS/Common/pfg_pie.sty,$
TYPE=REPORT, TITLETEXT='WebFOCUS Report', $
TYPE=DATA, COLUMN=N3, TARGET='iframe3', FOCEXEC=IBFS:/WFC/Repository/RIS/Application_Health_Dashboard/rpt_errors_level2_pie.fex(ERRTEAM=ERRLVL1.ERRLVL1.PEN_TEAM_NM), $
TYPE=DATA, COLUMN=N3, TARGET='iframe4', FOCEXEC=IBFS:/WFC/Repository/RIS/Application_Health_Dashboard/rpt_errors_level2_report.fex(ERRTEAM=ERRLVL1.ERRLVL1.PEN_TEAM_NM), $
*GRAPH_SCRIPT
setPieFeelerTextDisplay(1);
setUseSeriesShapes(true);
setMarkerSizeDefault(50);
setPieFeelerTextDisplay(1);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getLegendArea(),false);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
setPieSliceDetach(getSeries(*), 0);
*END
ENDSTYLE
END
-*IA_GRAPH_FINISH


WebFOCUS 8.0.08

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.2.03
z/OS
February 18, 2015, 02:42 AM
Ram Prasad E
Yes, it is possible. You need to use JavaScript to make it possible.

Instead of FOCEXEC use JAVASCRIPT and make a call to JS function either embedded within same FEX or placed in application server. In JS, you can use FORMs to refresh 2 iframes with 2 dynamic URLs.

Hope this helps.

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
February 18, 2015, 08:19 AM
stur0063
Here's a little snippet where, from a *.fex - I call a JavaScript function on the HTML page:

TYPE=DATA,
COLUMN=N3,
JAVASCRIPT=window.parent.setSearch( \
LITM \
ITM \
),
$

Then - from the HMTL page's setSearch javascript function - you can do whatever you need.


webFOCUS 8207.15
WindowsServer 2019
March 12, 2015, 01:56 PM
Joel Elscott
For those that are interested, I used the following steps to solve this issue. I created 3 fex files using the CAR file. iframe1.fex will pass &CAR to iframe2.fex and iframe3.fex. And then a HTML document with the 3 iframes.

Then...

1. Add a button to page (automatically named button1).
2. Right-click the button and add 2 hyperlinks for frames 2 and 3. In the end, that will create in input box for car (don’t create a form when prompted; it’ll be named edit1).
3. Test button1 manually by running the page and clicking it.
4. Write a small js function on the Embedded JS tab
   
function runDrillDowns(car) {
document.getElementById(“edit1”).value = car ;
OnExecute(null,”button1”);
}

5. Manually edit iframe1.fex: TYPE=DATA, COLUMN=N2, JAVASCRIPT=parent.runDrillDowns(CAR.COMP.CAR), $
6. Test functionality by running page and this time clicking on pie slice.
7. Hide the button and the input box

This message has been edited. Last edited by: Joel Elscott,


WebFOCUS 8.2.03
z/OS