advanced resizing iframe module

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/21/2013 4:13:56 AM
Gravatar
Total Posts 68

advanced resizing iframe module

Hi,

I am using the iframe module to display a search box. The results from that search are to be displayed just under the search box itself. This works fine when it is on an html page on its own. But when I include that page inside the iframe module I have to set the height of the iframe manually to show the search box and then then only parts of the results show with a vertical scroll bar.

What I want is when I click search for the module to resize itself to fit the result set without showing the scroll bar.

See the screenshot here http://goo.gl/B05NMB

If I set a height for the module to also include the possible height of the result set then before searching there is a lot of white space between this module and the one below it so it looks ugly.

Any suggestions?

11/25/2013 12:25:17 AM
Gravatar
Total Posts 68

Re: advanced resizing iframe module

Can anyone help me please? This is really important and I would really appreciate any help to figure this out.

Thanks in advance!

11/25/2013 1:02:09 AM
Gravatar
Total Posts 2

Re: advanced resizing iframe module

I also met the same problem on before. I just added following JavaScript to the sub page (page in the iframe) to solved this problem.


$('.iframeClass', window.parent.document).height=document.body.scrollHeight;

Our company provide the outsource service in MojoPortal CMS. you can visit following URL to get more information.

My company: Novasoftware

11/25/2013 9:37:05 AM
Gravatar
Total Posts 18439

Re: advanced resizing iframe module

Since you should not modify any mojoPortal code it would be better not to use our built in iframe module.

One could use the Html Content feature with the wysiwyg editor disabled from settings and put an iframe and supporting javascript right in the content which would give you full control over it.

As Edward Cheng showed, it would take custom javascript to produce the desired result.

12/9/2013 4:41:50 AM
Gravatar
Total Posts 68

Re: advanced resizing iframe module

Hi, Anyone ever get this to actually work? I have tried and just creating two html pages sepereately it works but when using the code within the HTML element in mojo it just does not. Even with the WYSIWYG editor turned off.

Is there some simpler code or another way? Please help!
 

12/9/2013 2:24:18 PM
Gravatar
Total Posts 216
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: advanced resizing iframe module

Hi Dominique,

What do you mean? When you say it works on two pages separately but not when using the HTML content instance do you mean that it breaks on the edit page (where the WYSIWYG usually is)?

As a side note, if this search function is going to be on every page of your website then you could also put the necessary HTML and JS right into the layout.master in your skin.

-Isaac

You must sign in to post in the forums. This thread is closed to new posts.