Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     stylesheet syntax for new window location and size
Go
New
Search
Notify
Tools
Reply
  
stylesheet syntax for new window location and size
 Login/Join
 
Expert
posted
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.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
<Grzegorz>
posted
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>,
 
Reply With QuoteReport This Post
Expert
posted Hide Post
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.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     stylesheet syntax for new window location and size

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.