I am a new WebFocus developer with knowledge of PL/SQL & I've recently returned from WebFocus training (Course 351, 354). I have searched through the last year's postings and cannot find anything on my topic. I am trying to accomplish using a single frame in the Resource Layout tool for two separate graphs (procedures). I want to use one of the two Parameters on layout screen to control whether the top graph is Visible or not. I'm hoping someone else has accomplished this before or if they can tell me whether or not it is even possible.
June 01, 2005, 08:33 PM
<JG>
Below is some code that if you add it to the htm file will toggle the graphs by clicking on them.
And the start of the 2 SPAN entries for your graphs need to be changed as follows (your id= will be different so change ITEM1 and ITEM2 in both the script and SPAN as required.
[/code]This message has been edited. Last edited by: <Mabel>,
June 01, 2005, 08:37 PM
Johnny T
Thanks JG, I will give this a try and let you know how it goes. Appreciate the quick reply! jtc
June 02, 2005, 02:19 PM
Johnny T
JG - this worked. Now when I click on each individual graph, it brings that graph forward and sends the other behing. My next question is, can I attach these functions either to a selection in my parameter dropdown list OR to a button? I appreciate any knowledge you can share as I have no Javascript background.
June 02, 2005, 04:16 PM
<JG>
Yes the same functionality can be driven from any option. Check Box, Radio button or Text link.
The key is that you call the correct script for what you want to do.
Basic principle for z-index when objects are overlaid is that the one with the highest number is the one that is visible.
For what you want to do I would actually suggest a dropdown list that the user picked his view from.
Send me a private message with a mail address and I�ll knock something together as an example.
June 03, 2005, 12:33 PM
<JG>
Johnny I decided to post the example as it might be of general interest even though it's rather long.
the focexec (named z-index.fex)
-* File z-index.fex -* Default Mode: ResourceLayout GRAPH FILE CAR SUM SEATS ACROSS COUNTRY ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET BARNUMB OFF ON GRAPH SET 3D OFF ON GRAPH SET VZERO ON ON GRAPH SET GRID ON ON GRAPH SET VAXIS 198 ON GRAPH SET HAXIS 268 ON GRAPH SET GRAPHSTYLE * setMarkerDisplay(true); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setAxisAssignment(0,0); setY1LabelDisplay(true); setY1AxisSide(0); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setTextFormatPreset(getY1Label(),-1); setTextFormatPattern(getY1Label(),"#.##"); setPieFeelerTextDisplay(1); setPieLabelDisplay(0); setTextFormatPreset(getPieSliceLabel(),1); setRiserBorderMode(1); setSeriesDefaultTransparentBorderColor(true); setUseSeriesBorderDefaults(true); setLegendDisplay(true); setFontSizeAbsolute(getY1Title(),true); setFontSizeAbsolute(getY1Label(),true); setFontSizeAbsolute(getY2Title(),true); setFontSizeAbsolute(getY2Label(),true); setFontSizeAbsolute(getO1Title(),true); setPlace(true); ENDSTYLE ON GRAPH SET STYLE * PAGESIZE='Letter', LEFTMARGIN=0.250000, RIGHTMARGIN=0.250000, TOPMARGIN=0.250000, BOTTOMMARGIN=0.250000, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, BACKCOLOR='NONE', STYLE=NORMAL, $ ENDSTYLE ON GRAPH HOLD AS ITEM1 FORMAT HTMTABLE END GRAPH FILE CAR SUM DEALER_COST ACROSS COUNTRY ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET BARNUMB OFF ON GRAPH SET 3D OFF ON GRAPH SET VZERO ON ON GRAPH SET GRID ON ON GRAPH SET VAXIS 198 ON GRAPH SET HAXIS 268 ON GRAPH SET GRAPHSTYLE * setMarkerDisplay(true); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setAxisAssignment(0,0); setY1LabelDisplay(true); setY1AxisSide(0); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setTextFormatPreset(getY1Label(),-1); setTextFormatPattern(getY1Label(),"#.##"); setPieFeelerTextDisplay(1); setPieLabelDisplay(0); setTextFormatPreset(getPieSliceLabel(),1); setRiserBorderMode(1); setSeriesDefaultTransparentBorderColor(true); setUseSeriesBorderDefaults(true); setLegendDisplay(true); setFontSizeAbsolute(getY1Title(),true); setFontSizeAbsolute(getY1Label(),true); setFontSizeAbsolute(getY2Title(),true); setFontSizeAbsolute(getY2Label(),true); setFontSizeAbsolute(getO1Title(),true); setPlace(true); ENDSTYLE ON GRAPH SET STYLE * PAGESIZE='Letter', LEFTMARGIN=0.250000, RIGHTMARGIN=0.250000, TOPMARGIN=0.250000, BOTTOMMARGIN=0.250000, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, BACKCOLOR='NONE', STYLE=NORMAL, $ ENDSTYLE ON GRAPH HOLD AS ITEM2 FORMAT HTMTABLE END -HTMLFORM z-index
(sorry I had to post it as code which means it will not cut and paste)
The HTML (z-index.htm) the added items in addition to the javascript are
HtmlPage
<script id=IbiOptionsScript type=text/javascript> var cgipath = "cgipath"; var ibirls = "ibirls"; var multidrill = "multidrill"; var mntFormValidate = "mntFormValidate"; var dyncalendar = "dyncalendar"; var ibiOptions = new Array(cgipath,ibirls,mntFormValidate,multidrill);