Focal Point
Calling javascript function from a graph for drill down

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

October 15, 2003, 08:57 PM
<kj>
Calling javascript function from a graph for drill down
For a drill down from graph, I am calling a javascript function With parameters.
One of the parameter has values with "_" and "-"( for example test_test, test-test).
When the graph is displayed on the browser, it is ignoring the parameter values which has _ and -. What could be the reason?

GRAPH FILE CAR
SUM
DEALER_COST
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH BAR
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 GRAPHSTYLE *
ENDSTYLE
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA, ACROSSCOLUMN=N1 , JAVASCRIPT=showdetail(A1 'SS_TEST'),$
ENDSTYLE
END


The value ss_test is not passed to the drill down report.
Any help would be greatly appreciated.
I am using WebFocus 5.21.

Thanks
October 17, 2003, 03:05 PM
<Emma Schwarz>
Try removing:
ENDSTYLE
$
from your request. The ENDSTYLE statement closes the styling section of the request and may be causing the subsequent statements to be ingored.
October 17, 2003, 07:01 PM
<kj>
There are couple of lines missing in the code I posted.
The actual code is

GRAPH FILE CAR
SUM
DEALER_COST
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH BAR
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 GRAPHSTYLE *
setFillColor(getSeries(0),new Color(102,0,112));
setGridStep(getY1MajorGrid(),5000000.0);
setFontStyle(getLegendText(0),2);
setLabelStagger(getO1Label(),FALSE);
setBorderColor(getX1MinorGrid(),new Color(133,133,133));
setBorderColor(getY1MinorGrid(),new Color(133,133,133));
setFillColor(getChartBackground(),new Color(254,255,225));
ENDSTYLE
ON GRAPH SET STYLE *
UNITS=PTS,
LEFTMARGIN=18,
RIGHTMARGIN=18,
TOPMARGIN=18,
BOTTOMMARGIN=18,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA, ACROSSCOLUMN=N1 , JAVASCRIPT=showdetail(A1 'SS_TEST'),$
ENDSTYLE
END