How to auto scale inline frame to browser

Hi guys,

I am working on a prototype in which I use an inline frame that has to be the exact size of the browser window. It also has to scale with the browser when the browser is resized.

Just like you do with CSS when you want to scale a background image that adjusts to browser size;

CSS
background: url(images/bg.jpg) no-repeat center center fixed; background-size: cover;

When I have the answer… I’ll post it.

Thanks!
Martin

MartinB,

I would imagine that you will have to pass JavaScript in the “Open in current window”. Personally I have never had to deal with this problem, but I wonder if the following can help you: Window resizeTo() Method

light_forger

Guess I going to dive into Javascript a little…

Thanks again light_forger!

Martin

Hey MartinB,

Don’t mention it! I am just returning the favor for your slick Android solution :thumbup:

light_forger

Figured out how to do this yet? I am trying to use this feature today as well.

Thanks,

Ram

Hi!

In the OnWindowResize interaction (one of the page interactions) use the Size command. No javascript calls are necessary.

OnWindowResize
   Set Size of (iframe) to (width) [[Window.width]] (height) [[Window.height]]

Be sure to include the double brackets.

1 Like

Hi Joseph,

I resolved my issue here is a file MOL-site-tablet.rp (7.0 MB)

Natalie

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.