Welcome Guest Search | Active Topics | Sign In | Register

How do I size the iframe in a Dialog? Options
John
Posted: Wednesday, June 12, 2013 3:09:02 PM
Rank: Member
Groups: Member

Joined: 6/12/2013
Posts: 13
Hello All,

Sorry if my question is basic, I'm fairly new to essential objects. I've inherited a project that uses essential objects pretty heavily, especially the dialog. The issue I'm having is that when I'm using a dialog that loads content through the ContentUrl, the iframe that loads the content expands out of the dialog window in Firefox. In IE9+ and Chrome I'm good but in Firefox the iframe is too wide and too tall. Using Firefox's web developer tools I can manipulate the width/height to where they should be but I'm not sure how to do that in Visual Studio. Can someone help me out with this? Thx.

- John
eo_support
Posted: Wednesday, June 12, 2013 3:11:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

If you want to have full control over the iframe, you can use ContentTemplate instead of ContentUrl. You can put an iframe inside the ContentTemplate, then set that iframe's src to the Url you want to load. That way you will have directly access to that iframe and you can do anything you want to do with it.

Thanks!
John
Posted: Wednesday, June 12, 2013 3:15:42 PM
Rank: Member
Groups: Member

Joined: 6/12/2013
Posts: 13
Well the thing is that ContentUrl is set dynamically with javascript, and different actions cause it to load different urls. Would you still suggest I use the ContentTemplate with an iframe, and that I dynamically change that iframe's url?
eo_support
Posted: Thursday, June 13, 2013 9:13:02 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Yes. That's correct.

Thanks!
John
Posted: Thursday, June 13, 2013 9:18:32 AM
Rank: Member
Groups: Member

Joined: 6/12/2013
Posts: 13
I found a Firefox hack that suited my needs for the time being but I still may have to go back to this solution. I had to examine the source in IE to get the inline style that was being injected into the iframe's tag and then I threw the following CSS into the head of the calling page...

Code: CSS
@-moz-document url-prefix() {
        #ID_OF_THE_IFRAME {
            width: 648px; height: 556px; position: absolute;
        }
      }


It was worked in the immediate but I'll have to do some more testing to know if it's going to be a permanent fix.
eo_support
Posted: Thursday, June 13, 2013 9:21:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
OK. I am glad that you found a solution. Thanks for sharing!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.