Focal Point
stylesheet syntax for new window location and size

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

February 16, 2004, 06:58 PM
susannah
stylesheet syntax for new window location and size
what is the focus style sheet syntax to call a fex to a new window that is of a specified size and location?
I know the syntax for targeting a new window, but what about sizing and locating that window?
(i can't use javascript because i'm calling the fex from Outlook).
thanks to anyone who might help.
February 19, 2004, 10:14 AM
<Grzegorz>
I do not think there is such a syntax in WebFOCUS style sheet, but you can use JavaScript to resize the window regardless of the method of invoking focexec. I assume that you have the WF report with a drill-down link as an embedded HTML within
an Outlook e-mail, so you cannot use syntax:


TYPE=..., ..., JAVASCRIPT=THESCRIPT(...),$[/code]One of the way to use resizing script is to add it to the target focexec, like in the following example:


-* The focexec with drill-down:
TABLE FILE CAR
PRINT
COMPUTE TOPLEFT/I2 = SEATS * 3;
COMPUTE WDT/I3 = WIDTH * 6;
COMPUTE HGT/I3 = HEIGHT * 6;
ON TABLE SET STYLE *
TYPE=DATA, FOCEXEC = TARGET( \
-* "Resizing" parameters:
PTOP = SEATS \
PLEFT = SEATS \
PWIDTH = WDT \
PHEIGHT = HGT \
-* Other parameters:
-* ...
),$
ENDSTYLE
END

-* The TARGET focexec:
TABLE FILE CAR
SUM SALES
BY COUNTRY
ON TABLE HOLD AS RPT1 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN


<script type="text/javascript">
// Move and resize accorindg to the parameters
function resize() {
window.moveTo(&PLEFT, &PTOP);
window.resizeTo(&PWIDTH, &PHEIGHT);
}



!IBI.FIL.RPT1;


-HTMLFORM END

Another method is to use a "proxy" focexec, which just redirects report request to the "real" target, and resizes and moves the browser window on-the-fly. In this case the target focexec does not need any changes.


-* "Proxy" target:
-HTMLFORM BEGIN


<script type="text/javascript">
function reload() {
var focurl = "/ibi_apps/WFServlet";
// Construct the real target URL here
// according to the report parameters:
focurl += '?' + "IBIF_ex=carinst"; // just the test
// ...
// Move, resize the window and run the report:
window.moveTo(&PLEFT, &PTOP);
window.resizeTo(&PWIDTH, &PHEIGHT);
window.location = focurl;
}




-HTMLFORM END

Hope this helps
Grzegorz

This message has been edited. Last edited by: <Mabel>,
February 19, 2004, 02:05 PM
susannah
creative, grzegorz. thanks. our outlook is bolted down so tightly that no js will run from it. but you've given me a great idea to try a diff. way.