Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameFeature Request -- IFrame Auto ResizingFeature Request -- IFrame Auto Resizing
Previous
 
Next
New Post
6/24/2006 3:41 PM
 
Feature request: auto-resize support for the IFrame module's Width/Height.

First, I have been doing this successfully by using the trick mentioned here:
http://forums.asp.net/580096/ShowPost.aspx

However, after upgrading to 4.3.1, it is broken.

For example, I set the IFrame Height textbox to:
600" id="myframe" name="myframe" onload="stretchIFrame('myframe','600')

And in DNN 4.3.1 (or is it due to just the module upgrade in 4.3.1?) it results in the rendered output to the page as:
height="600" id="myframe" name="myframe" onload="stretchIFrame('myframe','600')"

I still need to track down the code that's translating " to "

---

But back to the feature request. Even though auto-resizing is limited to a site's domain, it is still very useful. Also, a lot of people seem to ask about this capability.

At minimum, this feature could be supported by simply providing another field where we can inject attributes/code (as above) which won't be modified.

Right now, it's a true hack. And like most good hacks, it has come back to bite ;)

Jim

 
New Post
10/4/2006 6:13 PM
 
I actually just popped onto the forums to look for a hack for this... It seems I just installed the same version =\ lol... I'll give the hack a try and see if it works anyway. But I second this motion - ftr!
 
New Post
10/5/2006 3:40 PM
 
i have the same problem after the upgrade... anyone here have a fix?
 
New Post
12/11/2006 5:22 PM
 
 
New Post
3/14/2007 8:31 PM
 

After much experimentation I have managed to get auto-resizing working but whether or not it is due to new features within DNN4.4.1 I am not sure.  I needed resizing because I have a HTML master page with two HTML iframes with the left hand iframe containing a menu (a mapped image actually) which changes the contents of the right hand iframe. When opened directly within a browser the master page is resized correctly as the righthand frame resizes itself when its content is changed.

I accomplished it using the following three steps:

1. I created a Javascript Library file (Resizer.js) containing the following function:

// -----------------------------------------------------------------------------------------

function resizeIframe(frameName) {
 
try {
   
var body = window.frames[frameName].document.body; 
   
if(body) {
     
var ifrm = document.getElementById(frameName);
     
if (ifrm) {
       
ifrm.style.height = (body.scrollHeight || body.offsetHeight) + 20 +
'px';
      }
   
}
 
}
 
catch (e) {
   
// Ignore this for now
 
}
}
// ---------------------------------------------------------------------------------------

2. I uploaded this js file to a folder under the portal in which I wished to use it.

3. In DNN I navigated to the page on which I wished to place the resizeable IFrame module.  I then changed the page settings so that the Page Header Tags field contained the following:

<

script type="text/javascript" src="/Portals/1/Library/Resizer.js"></script>

4. I then added the resizeable IFrame and set the URL to the page that I wished display by editing the IFrame options accordingly.  I also set the Name of the frame to masterFrame, and then in the OnLoad field entered this:

resizeIframe('masterFrame');setInterval('resizeIframe(\'masterFrame\')', 500);

5. And then it all works as desired.

To have a look for yourself please check out http://sit.tullemans.net/Process/WebDevelopmentProcess/tabid/71/Default.aspx.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameFeature Request -- IFrame Auto ResizingFeature Request -- IFrame Auto Resizing


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out