Focal Point
IFrame contents

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

August 21, 2008, 02:38 PM
SSPriya
IFrame contents
I have 4 iframes in one web page. And I am pulling some reports from webfocus into iframe. How can I get the contents of the report to get adjusted with the size of the iframe. Thanks


viji
August 21, 2008, 02:40 PM
GinnyJakes
Make the frame bigger or the font on the report smaller.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
August 21, 2008, 02:48 PM
SSPriya
The IFrames have to be aligned in a way that 2 iframes must be in one row. so i cannot change the size of the iframe as it pushes the other iframe to different row.
Is there a property in IFrame that would squeeze the contents so that it would fit the IFrame??


viji
August 21, 2008, 08:27 PM
susannah
SS, is it width or height you're worried about?
Is the user adjusting the iframe?
or is the iframe a fixed size and then what's happening to the report? do you have scrollbars on in your iframes?
You know there's an alternative to using iframes...
let your fex launch into a separate frame:
Say your fex makes 4 outputs..
call them MYTAB1, MYTAB2, MYTAB3, MYTAB4
eg:
TABLE FILE ..
...
ON TABLE HOLD AS MYTAB1 FORMAT HTMTABLE
END
...repeat 3 times;
-RUN
-HTMLFORM BEGIN
<TABLE>
<TR>
<TD>
!IBI.FIL.MYTAB1;
</TD><TD>
!IBI.FIL.MYTAB2;
</TD></TR>
<TR><TD>
!IBI.FIL.MYTAB3;
</TD>
<TD>
!IBI.FIL.MYTAB4;
</TD></TR></TABLE>
-HTMLFORM END

adjust as needed, and you get all 4 bits on one page. There are alot of different configurations you can use, depending on what you need.
..




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 22, 2008, 10:47 AM
SSPriya
The users don't like the scrollbars. They want to see the full contents of the iframe without scrolling. so that means i need to resize the contents and adjust according to the iframe size. And i cannot resize the iframe bigger as i need 4 iframes in one webpage(2 in one row).


viji
August 22, 2008, 06:15 PM
susannah
then do it exactly the way i showed you, and you'll avoid iframes, avoid scrollbars, and see the whole table in each of the 4 cells, every time.

This message has been edited. Last edited by: susannah,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
September 08, 2008, 04:02 PM
<Tmproff>
I wish this would work for expandable reports! I used this code and got an error:
TABLE FILE CAR
PRINT
     SALES
BY COUNTRY
BY MODEL
ON TABLE SET EXPANDABLE ON
ON TABLE NOTOTAL
ON TABLE HOLD AS MYTAB1 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
END
-RUN

TABLE FILE CAR
PRINT
     SALES
BY COUNTRY
BY MODEL
ON TABLE SET EXPANDABLE ON
ON TABLE NOTOTAL
ON TABLE HOLD AS MYTAB2 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
END
-RUN

TABLE FILE CAR
PRINT
     SALES
BY COUNTRY
BY MODEL
ON TABLE SET EXPANDABLE ON
ON TABLE NOTOTAL
ON TABLE HOLD AS MYTAB3 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
END
-RUN

TABLE FILE CAR
PRINT
     SALES
BY COUNTRY
BY MODEL
ON TABLE SET EXPANDABLE ON
ON TABLE NOTOTAL
ON TABLE HOLD AS MYTAB4 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
END
-RUN

-HTMLFORM BEGIN
<TABLE>
<TR>
<TD>
!IBI.FIL.MYTAB1;
</TD><TD>
<BR></BR>
!IBI.FIL.MYTAB2;
</TD></TR>
<BR></BR>
<TR><TD>
!IBI.FIL.MYTAB3;
</TD><TD> 
<BR> </BR>
!IBI.FIL.MYTAB4;
</TD></TR>
<BR></BR>
</TABLE>
-HTMLFORM END  

September 09, 2008, 03:02 AM
Tony A
That is likely to be due to the fact that each expandable report is self contained and includes the JS and everything it requires - so no return visit to the server to get anything else. As a consequence there will be an inclusion of JS the controlling JS file for each output and also the HTML tag names and IDs will be reused for each self contained output. You're going to have conflicts.

Use Iframes to avoid this as each Iframe will have inner HTML and act as a child to the parent HTML page therefore each output will act as intended - self contained.

If you want your output fitting your Iframe size then try and use the "zoom" attribute within the Iframe CSS styling. Not sure if it works with browsers such as Firefox etc. but it does with IE.

<iframe id=ITEM1 src="http://www.google.co.uk" onmouseover=resizectrl("ITEM1"); style="zoom:10%; HEIGHT: 400px; WIDTH: 600px;">
<script>
function resizectrl(ctrl) {
document.form.reset();
el = document.getElementById(ctrl);
el.style.zoom = "100%";
}


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 09, 2008, 06:00 PM
Waz
Tony is absolutely right.

When the expandable report is generated, a label of table1 is applied to the report, in fact all the reports.

I took you example, changed the HTMTABLE to HTML and ran it, had a look at the contents.

Each report has the same label.

If the label of table1 is changed to table2 for the second report, and so on, each report works ok, but looks horrible.

I would assume that IBI will (May, perhaps, possibly, one blue moon) add functionality to change the table1 to table{n}, or let you set it you self.

Til then, you will have to keep each report separate with, as Tony suggests, Iframes.

Or you could try to post process each HTM file to change the table1 to something else.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!