Skip to Content
avatar image
Former Member

Resize IFrame

Hi,

I'm am using an iFrame in Web Dynpro to display a string of formatted text. I would like to have the iFrame resize based on the content of the page loading so the iFrame does not load with a scroll bar. Does anyone know if this is possible? If it is possible can you show me how.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 16, 2006 at 03:30 PM

    The iFrame's source is a page generated by passing IWDCachedWebResource a string of formatted text. I pass the URL of the generated page to be displayed in the iView

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Cindy,Valery

      I tried both the methods in the blog by valery.They are not working for me .The first method throws a access denied java script error .As I am new to javascript I could not understand.The second method simply does not work.I use IE.Is there any property I need to set on Iframe UI element .Can u ppl please tell me what the problem could be and solution if possible.This is very urgent.Thanks a lot.

  • Jun 16, 2006 at 03:13 PM

    Hi Jonathan,

    Create 2 context attributes iFrameWidth and iFrameHeight. Bind iFrame properties width and height to context attributes. In your code calculate values of context attributes depending of the content size.

    best rehards, Maksim Rashchynski.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 16, 2006 at 03:15 PM

    Thanks Maksim,

    I'm unsure how to obtain the content size. Could you show me the code needed to obtain it?

    Add comment
    10|10000 characters needed characters exceeded