Dot Net Nuke IFrames

Last post 12-10-2004 9:29 PM by smartsource-it. 25 replies.

Sort Posts:

  • Re: Dot Net Nuke IFrames

    05-17-2004, 9:53 PM
    • Loading...
    • xddg
    • Joined on 12-10-2002, 3:09 PM
    • Melbourne
    • Posts 1,874
    • TrustedFriends-MVPs
    The Iframes module as far as I understand is to put in an external file by way of height/width only.

    It is not for applying javascript or css functions to.

    That information should be put into the external file you have created.

    It's a holder for an external file.. in simple plain english.

    Make note of the width you have allowed in the external file, allow a few more pixels for good measure.

    If you manage your scrolling via the externa file, turn off *auto scroll* in the iframe setup you should be able to acheive the same results.

    I use iframes for my email subscription form, where we use a script to check email address is filled out and I could'nt get it to work with the text/html editor, so I put it in the external file, solved all problems.

    On my site, I have an external *subscribe* form with a *thank you* redirect running in the iframe with no problems.

    So, trick is- do all your bells and whistles in your external file and just link via height/width/scroll attributes.

    Nina

    Nina Meiers


    Free Skins & Containers by Nina Meies
  • Re: Dot Net Nuke IFrames

    05-19-2004, 11:39 PM
    • Loading...
    • sabine
    • Joined on 08-04-2003, 3:54 PM
    • Saskatchewan, Canada
    • Posts 235
    stevenewbie,

    The script that I suggested will cause errors if you are framing a web page that is on a different domain name. (Read the earlier posts in this thread about security problems).

    This line,

    388" style="height:expression(contentWindow.document.body.scrollHeight+50);"

    can only be used if the 'framed' web page is in the same domain as the parent page. (This is because your web browser will try to 'protect' the properties of the 'contentWindow')

    OR, perhaps the runtime error is caused by other scripts on your page?

    Regards.
  • Re: Dot Net Nuke IFrames

    05-20-2004, 12:18 AM
    • Loading...
    • sabine
    • Joined on 08-04-2003, 3:54 PM
    • Saskatchewan, Canada
    • Posts 235
    Hello xddg/Nina,

    I can appreciate your advice here, and normally I try to stay away from such tricks in DNN.

    However, the iFrame module in DNN doesn't provide any method of applying CSS to the iFrame - it provides only the width/height attributes (and these are defined as HTML tag attributes instead of CSS in the resultant Code which is good for browser compatibility, but not-so-good if I want to have more dynamic control of page layout.)

    What I mean is that the height/width attributes of an iframe can (and should) be set to a hard-coded pixel size a la height="##" width="##", and this is good if I know the exact dimensions of the visitor's web browser and screen resolution, but if I want to (for example) show an iframe on a page that is exactly the width of the visitor's browser window...then I have to either rewrite the iframe module or employ a CSS trick in DNN's iframe module settings.

    MSIE support expressions in CSS...which means that in a style declaration I can set the height of an element like <iframe> to an expression like: clientHeight-50. (In this case, MSIE will make the iframe 50 pixels less than the total height of the browser window - and older/other browsers will simply ignore the declaration.)

    What you have suggested might be to place a script like the following into the framed page:

    window.parent.frames("dnn_iframe_name").style.height='4000px' (doesn't work...)

    Whereby, the height of the iframe (in the parent) is dynamically set by a script in the child frame. But, again for security reasons, web browsers don't allow child frames to access certain objects of the parent frame.

    So, it seems that until the DNN iframe module provides a mechanism whereby the 'style' of the iframe can be defined in the module's settings, then I'll continue to employ this workaround in special circumstances.

    I'll note also that I've been using this technique for many months with no ill effect.

    Cheers
  • Re: Dot Net Nuke IFrames

    07-16-2004, 1:01 AM
    Question for Sabine or Nik:

    Need to I-Frame content from a 3rd party site. Desire to have the frame adjust dynamically in height to the content. Width=100% works fine, height as indicated in this thread does not.

    What if I were to create a html framed page in my domain for retrieving the content and use Nik's java script trick to I-Frame this same domain frame page?

    Could this I-Frame of a framed page adjust dynamically in height to the content of the 3rd party site?


  • Re: Dot Net Nuke IFrames

    07-16-2004, 2:32 AM
    • Loading...
    • nokiko
    • Joined on 10-22-2002, 2:36 PM
    • Utrecht, Netherlands
    • Posts 2,146
    Hi

    If you would be using a screenscaping module of some sort or another way ofparsing in the information in a module from an external source then the content is considdered to be on same domain. Just remember when doing this you are netering the twighlight zone in regards too copyright issues.

    In my normal job I work for a comany like moreover and there are a lot of issues regarding framed content how when, how you need to reference them etc.

    if you would be trying to have one iframe page and in there set everything the iframe the second page int here and use this in iframe module beware, this would change the dom tree of your page and then javascript if not properly setup couold cause unexpected results
    Armand Datema
    5 Skins, 4 SkinObject, 38 Containers, 2 Modules and more Euro 50 a year.
    SchwingNuke
    Offshore DNN and ASP.net development
    Container Creator
  • Re: Dot Net Nuke IFrames

    07-16-2004, 9:19 PM
    Application is a 3rd party e-commerce / ordering system. Using DNN for branding, support modules and user management. The application contains a number of different modules and scraping is not a viable option.

    Width works ok if set to 100% and adjusts dynamically between different resolutions. Height doesn't and for the here and now I've set the height to 1024. Figure users would have to scroll beyond this anyways. No go with the i-frame of a frame. Out of Ideas.

    Bandaids: Call a framed page with DNN in banner frame and application in content frame. Use Tab Redirect in navigation. Limits skin design but will adjust to screen better.
  • Re: Dot Net Nuke IFrames

    07-17-2004, 4:43 AM
    • Loading...
    • nokiko
    • Joined on 10-22-2002, 2:36 PM
    • Utrecht, Netherlands
    • Posts 2,146
    mm

    I find some more script here

    I also did a script once that just set all the scrollbars to invisible and used custom images for scrolling
    Armand Datema
    5 Skins, 4 SkinObject, 38 Containers, 2 Modules and more Euro 50 a year.
    SchwingNuke
    Offshore DNN and ASP.net development
    Container Creator
  • Re: Dot Net Nuke IFrames

    07-17-2004, 5:52 AM
    • Loading...
    • nbc
    • Joined on 06-29-2002, 12:06 AM
    • Perth, Western Australia
    • Posts 1,469
    smartsource - I had a similar situation to and never got a staisfactory result using iframe. Your bandaid workaround maybe the closest you get. My problem was resolved by the third party implementing an xml api so I could just get raw data and display as I wanted, maybe your party has something similar, web service?

    Regards
  • Re: Dot Net Nuke IFrames

    07-18-2004, 5:08 PM
    Anyone checkout the Indiana Skin from the contest? It kind of frames content and has some transparency effect. Don't fully understand why it works.
  • Re: Dot Net Nuke IFrames

    07-18-2004, 5:30 PM
    • Loading...
    • nokiko
    • Joined on 10-22-2002, 2:36 PM
    • Utrecht, Netherlands
    • Posts 2,146
    HI

    the indiana skin uses javascrit there is

    <DIV id="nonscrollsection">


    and using some script this dis dv will always be at top place so in other words the rest scrolls and not that one. You can also do this with pure css using position:fixed
    Armand Datema
    5 Skins, 4 SkinObject, 38 Containers, 2 Modules and more Euro 50 a year.
    SchwingNuke
    Offshore DNN and ASP.net development
    Container Creator
  • Re: Dot Net Nuke IFrames

    12-10-2004, 9:29 PM
    Checkout

    http://guymal.com/mycode/iframe_size/

    The script below works reasonable well for achiveing 100% height.

    http://guymal.com/mycode/100_percent_iframe/
Page 2 of 2 (26 items) < Previous 1 2
Microsoft Communities
Page view counter