As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
iframes seem to be very tricky. i have 4 frames on my html page and can we set them like if 1st frame gets more data and it should expand to show all and at the same time can other 3 frames expand accordingly?
can someone post some tips when working with multiple frames on html page.
thanksThis message has been edited. Last edited by: Kerry,
First off, why are you using iFrames for this. Do you "just" want to display four individual reports, one over the other? If so just run the four (report generating) focexecs "in line". Or, use the !IBI.FIL.filename;. Or, there's a few more depending on what output you want.
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
I've had the same question a couple of years ago (3 iframes and all of those iframes had to start were the "previous one" ended AND all these iframes had to have no scrollbars).
After some searching on the laptop, I found the code I used. I did a quick translate of the code, so it's maybe not the best English, but I hope you'll get the point.
The approach was:
1: Hide all IFRAMES after clicking the run button (+ show WAIT-message) 2: Wait for all IFRAME's to complete 3: Adjust height 1-by-1
That's it.
This example uses 3 fexes (car11/12 and 13); these are also copied below the HTML (I ran it all from baseapp )
Cheers, -Fred-
<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Created in release 7701, Generation 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";
var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";
var ibixmltree="ibixmltree";
var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>
<SCRIPT id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>
<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>
<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>
<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
}
//End function window_onload
// -----------------------------------------------------------------------------------------------
// Init script. See <FORM>-tag // onsubmit="OnExecute(this);initFunction(this);return false;"
// -----------------------------------------------------------------------------------------------
function initFunction() {
statusIframes('hidden','iframe1','iframe2','iframe3');
document.getElementById('text1').style.display = 'block';
startTimer();
}
// -----------------------------------------------------------------------------------------------
// Hide IFRAME during re-positioning; looks better. After iframes have been loaded, show them again
// The first argument MUST be SHOW or HIDDEN
// -----------------------------------------------------------------------------------------------
function statusIframes() {
var theStatus = arguments[0];
for (var i=1; i<arguments.length; i++) {
document.getElementById(arguments[i]).style.visibility = theStatus;
}
}
// -----------------------------------------------------------------------------------------------
// Check every 1/10th second what the status is of all IFRAMES
// -----------------------------------------------------------------------------------------------
function startTimer() {
if (document.getElementById('iframe1').readyState == "complete" &&
document.getElementById('iframe2').readyState == "complete" &&
document.getElementById('iframe3').readyState == "complete") {
resizeFrames();
// --- Show IFRAME's again after all IFRAMES are ready
statusIframes('visible','iframe1','iframe2','iframe3');
document.getElementById('text1').style.display = 'none';
}
else {
timer=setTimeout("startTimer()",100)
}
}
// -----------------------------------------------------------------------------------------------
// Ale IFRAMES are now "complete".
// Determine the length of the content of every IFRAME + change the height
// -----------------------------------------------------------------------------------------------
var posTopNew = 0;
function resizeFrames() {
clearTimeout(timer);
posTopNew = parseInt(document.getElementById('iframe1').style.top); // Determine topPosition of 1st IFRAME.
setFrameProperties('iframe1');
setFrameProperties('iframe2');
setFrameProperties('iframe3');
}
// -----------------------------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------------------------
function setFrameProperties(_id) {
var _obj = document.getElementById(_id);
var _newHeight = _obj.contentWindow.document.body.scrollHeight; // Determine height of content of IFRAME
var _tmpTop = _obj.style.top;
_obj.style.height = _newHeight + 5; // Adjust height of IFRAME (+5 marge)
_obj.style.top = parseInt(posTopNew);
var _tmpHeight = _obj.style.height;
posTopNew = parseInt(_tmpTop) + parseInt(_tmpHeight) + 5; // posTopNew is now new starting-position of next IFRAME
}
</SCRIPT>
<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" nextelementuniquenumber="1" thumbnailscale="4" elementtype="21" edaconnectionrequired="true">
<FORM style="Z-INDEX: 5; POSITION: absolute; WIDTH: 200px; HEIGHT: 50px; TOP: 20px; LEFT: 20px" id=form2 tabIndex=5 onsubmit="OnExecute(this);initFunction(this);return false;" method=post form_type="4" fexlist_list="report1" default_slider_type="5" form_prompt_location="1" form_number_of_visible_rows="4" form_number_of_columns="4" vert_dist_between_controls="10" form_hor_dist_between_controls="10" form_dist_between_desc_and_input="10" requests_list="4;5;6" name="form2">
<INPUT style="BACKGROUND-IMAGE: url(/ibi_html/javaassist/ibi/html/describe/run16.gif); Z-INDEX: 6; POSITION: absolute; BACKGROUND-COLOR: white; WIDTH: 175px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 10px; LEFT: 10px" id=form2Submit language=javascript tabIndex=6 value="Run reports" size=88 type=submit StyleBack_UserSuppliedFullPath="1" name="ITEM1"> </FORM>
<IFRAME style="Z-INDEX: 11; POSITION: absolute; BORDER-RIGHT-WIDTH: 1px; WIDTH: 813px; BORDER-TOP-WIDTH: 1px; BORDER-BOTTOM-WIDTH: 1px; HEIGHT: 152px; BORDER-LEFT-WIDTH: 1px; TOP: 86px; LEFT: 20px" id=iframe1 tabIndex=11 src="" frameBorder=no autoExecute="False" name="iframe1"></IFRAME>
<IFRAME style="Z-INDEX: 12; POSITION: absolute; WIDTH: 813px; HEIGHT: 135px; TOP: 253px; LEFT: 20px" id=iframe2 tabIndex=12 src="" frameBorder=no autoExecute="False" name="iframe2"></IFRAME>
<IFRAME style="Z-INDEX: 13; POSITION: absolute; WIDTH: 813px; HEIGHT: 133px; TOP: 404px; LEFT: 20px" id=iframe3 tabIndex=13 src="" frameBorder=no autoExecute="False" name="iframe3"></IFRAME>
<SPAN style="Z-INDEX: 15; POSITION: absolute; FONT-STYLE: italic; WIDTH: 453px; DISPLAY: none; FONT-FAMILY: Verdana; HEIGHT: 30px; FONT-SIZE: 14pt; TOP: 242px; LEFT: 72px" id=text1 tabIndex=15>Moment, executing report(s) .....</SPAN>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=fred type=hidden name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibic_server value=EDASERVE type=hidden isdataserversarea="1" name="ibic_server">
<xml id=focus_xmlelement>
<script type="text/xml">
<rootxmlnode focoption="_FOC_NULL">
<requests>
<request requestid="4" sourcetype="typeFex" targettype="0" targetname="iframe1" ibif_ex="car11.fex" ibic_server="" ibiapp_app="baseapp"></request>
<request requestid="5" sourcetype="typeFex" targettype="0" targetname="iframe2" ibif_ex="car12.fex" ibic_server="" ibiapp_app="baseapp"></request>
<request requestid="6" sourcetype="typeFex" targettype="0" targetname="iframe3" ibif_ex="car13.fex" ibic_server="" ibiapp_app="baseapp"></request></requests>
<variables></variables>
<input_controls></input_controls>
<other_bound_objects></other_bound_objects></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>
and the fexes (output isn't looking too good; just to make clear were iframes starts and ends)
-* ------------------------------------------------------
-* File CAR11.fex
-* ------------------------------------------------------
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
ON TABLE HOLD AS RPRT1 FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT, BACKCOLOR=RGB(220 220 220) ,$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
!IBI.FIL.RPRT1;
</html>
-HTMLFORM END
-* ------------------------------------------------------
-* File CAR12.fex
-* ------------------------------------------------------
-DEFAULT &RECLIMIT = 'FOC_NONE'
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
BY CAR
BY MODEL
IF RECORDLIMIT EQ &RECLIMIT
ON TABLE HOLD AS RPRT2 FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT, BACKCOLOR=RGB(240 240 240) ,$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
!IBI.FIL.RPRT2;
!IBI.FIL.RPRT2;
!IBI.FIL.RPRT2;
</html>
-HTMLFORM END
-* ------------------------------------------------------
-* File CAR13.fex
-* ------------------------------------------------------
-DEFAULT &RECLIMIT = 'FOC_NONE'
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
BY CAR
IF RECORDLIMIT EQ &RECLIMIT
ON TABLE HOLD AS RPRT3 FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT, COLOR=RED ,$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
!IBI.FIL.RPRT3;
!IBI.FIL.RPRT3;
</html>
-HTMLFORM END
This message has been edited. Last edited by: <FreSte>,
That's the "!IBI.FIL.filename;" whioch I was talking about. Each of those "-HTMLFORM"s expands as required and display everything. You could even add the center tags.
-HTMLFORM BEGIN
<html>
<center>
!IBI.FIL.RPRT1;
</center>
</html>
-HTMLFORM END
to each -HTMLFORM... Why? Why Not?
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
You're right about expanding if the ouput is re-directed to a new window.
If the output is re-directed to iframes, those iframes are not expanded by default to fit the report and from what I understood, the output had to be in an iframe. And 4 out of 5 customers I worked for want to have a "all-in-1-screen" (parameters and output), so iframes are quite OK to work with.
-Fred-This message has been edited. Last edited by: <FreSte>,