Page 1 of 1
Using a layout inside of an iFrame
Posted: Fri Jun 10, 2016 5:49 pm
by MLC601
we have a requirement for a responsive website that needs to run inside of an iframe (from a customer's website). We've played around a bit with some simple layouts but what we're experiencing is that the layout doesn't resize to the iframe in our tests with a fixed size iframe.
Is there any way to have the layout adjust to the size of the iframe?
Thanks,
Mark
Re: Using a layout inside of an iFrame
Posted: Fri Jun 10, 2016 6:40 pm
by Scott Klement
I'm not sure that I follow you. You say that the iframe is a fixed size, but then you say it doesn't resize to the iframe... if the iframe is a fixed size, what would cause it to need to resize?
I just ran a test myself with an iframe that was not a fixed size, and when I adjusted the size of the iframe, the size of the layout adjusted automatically, as expected.
Re: Using a layout inside of an iFrame
Posted: Wed Jun 15, 2016 9:28 am
by MLC601
This will from several different customers' websites. Some will be responsive while others will have a fixed size iframe.
We were hoping to see our screen(s) resize to the iframe. I tried it in a fixed iframe and some of the screen was cut off by the iframe. The layout is set to 100% height, 100% width.
Another question...when running this outside of an iframe, should we see the screen resize dynamically as the browser window is resized or will the layouts only adjust based on the system's display size? We don't see the screen adjust when resizing the browser window. This is a very simple test screen (a simple container layout with a simple panel and an exit (CSS button) in it). the Panel is set to 100%/100% and the button is Left - 15%, top 25%, height 10%, width 35%.
We're running Profound UI v5.4
Guess we're missing something.....
Thanks,
Mark
Re: Using a layout inside of an iFrame
Posted: Wed Jun 15, 2016 3:01 pm
by Scott Klement
Layouts resize dynamically as the window changes. Like I said, I ran a test... as you adjust the size of the iframe, the display also changes. (Instantlly) In a browser window (without an iframe, or with an iframe that adjusts to the window size) the layout resizes as you drag the window to a new size, you see the update instantly.
I think you must be doing something wrong, but I don't see anything wrong with what you've posted.
We have lots of customers using layouts, and I've never heard a complaint that they don't resize until now.
Re: Using a layout inside of an iFrame
Posted: Wed Jun 15, 2016 4:14 pm
by MLC601
Thanks Scott...that's what I thought we should see. I installed another instance of Profound UI and it seems to work in that one so it appears it may have something to do with our configuration. I do believe we're running an unmodified start.html in both instances but I'll have to poke around to see what we have that's different.
Thanks,
Mark
Re: Using a layout inside of an iFrame
Posted: Thu Jun 16, 2016 2:18 pm
by Scott Klement
I would look for a CSS file. Probably you have a CSS that is setting the dimensions of something... If you are using the Rich Display controller (/profoundui/start or 'Rich' launcher in Atrium) then look under /www/YOUR-INSTANCE/htdocs/profoundui/userdata/custom or a subdirectory beneath that. Look for a CSS file (or possibly a JavaScript... but CSS is probably more likely) that is setting a height/width.
If using Genie as a controller (/profoundui/genie URL, or 'Genie Macro' launcher in Atrium) then most likely the file would be included with a <link> or <script> tag in your start.html.
Good luck
Re: Using a layout inside of an iFrame
Posted: Thu Jun 16, 2016 3:15 pm
by MLC601
Scott,
I found it this morning. You were correct. We did have a CSS that was done for a particular application that had some specific display requirements. I moved it out of our /custom/css directory and set the external CSS in the one display file that needed it to point to the new location.
Thanks for the help.
Mark