cancel
Showing results for 
Search instead for 
Did you mean: 

Stretch content of IFrame

horst_hring
Explorer
0 Kudos

Hi all,

I need to display a simple pdf document with a navigation bar. The desired behaviour is that the navigation bar sticks to the bottom of the window and the content area resides above stretchig to fill the rest of the window. The navigation bar (and its elements) should stay fixed in its place.

I created two views and put them in a viewset (gridlayout/1 column 2 rows). For the navigation bar (view) I set the layout (of the RootElementContainer) to matrixlayout and stretchedVertically false. For the content (IFrame and RootElementContainer) I also set the layout to matrixlayout and width/height of IFrame to 100%. But the content are won't stretch in height.

So what is wrong?

Accepted Solutions (0)

Answers (2)

Answers (2)

horst_hring
Explorer
0 Kudos

Hi,

for everyone who want's to know - I opened a corparate message and got following answer:

" [...]

this is a known limitation in NetWeaver 2004 and for architectural

reasons the behaviour can not be changed by a bug fix.

If you rely on this functionality you may use NetWeaver 2004s SPS 5 or

use a fixed height in the unit pixels.

A am sorry that these are the only proposals I can make.

Best regards,

Fridtjof Graef

Development Support

Web Dynpro for Java

SAP Netweaver

Walldorf/Germany"

Cheers,

Horst

Former Member
0 Kudos

Hi,

You will have to enter the width and height as pixel values e.g. 125px. Fixing width as 100% won't stretch the IFrame to full width.

regards,

Mahesh

horst_hring
Explorer
0 Kudos

Hi Mahesh,

this is what I did. I entered hight in pixel values. But then the content won't stretch in height.

The thing is that I am reimlpementing an old application where the content pane does stretch in hight and width.

The thing with the IFrame is that using % works fine for the width but not for height. I thought there should be done some settings for the surrounding RootContainer.

Horst

Former Member
0 Kudos

Horst,

This is not a WD limitation, this behavior is specific to all browsers. What HTML developers usually do is some kind of window.onresize event handler that takes current available width / size and assigns them as absolute values to necessary elements (BODY, DIV) etc.

Try to create plain HTML page with same layout using only CSS and you'll see that this is impossible. So it hardly could be labeled as WD limitation / bug.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

horst_hring
Explorer
0 Kudos

Hi Valery,

I'm not an HTML developer but i have to disagree. I extracted following code from the old application. Try it (just put a pdf-file named image.pdf in the same folder).

It stretches nicely in height. This should work fine for me if it would work like that in WD.


<html><head></head>
<body>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
    <td width="100%" height="94%">
      <iframe src="image.pdf" width="100%" height="100%" name="test"
              scrolling="no" marginheight="0" marginwidth="0" frameborder="0">
      </iframe>
    </td>
  </tr>
  <tr><td width="100%" height="4%">test</td></tr>
</table>
</body>
</html>

Kind regards,

Horst

Former Member
0 Kudos

If you think you have found a bug, please open an OSS message on component BC-WD-CLT-HTML.

Armin