How to auto scale inline frame to browser

mobile-prototyping

#1

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


#2

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


#3

Guess I going to dive into Javascript a little…

Thanks again light_forger!

Martin


#4

Hey MartinB,

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

light_forger


#5

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

Thanks,

Ram


#6

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.


#7

Hi Joseph,

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

Natalie


closed #8

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