11 Replies Latest reply on Aug 28, 2008 6:45 AM by designer_80

    Need iFrame Help!

    designer_80 Level 1
      Firefox is fine but Internet Explorer is not showing the iframes. Is there a possible fix or solution? Scrolling iframes don't scroll and some with images don't show anything?

      I could really use some help.
      Thanks.
        • 1. Re: Need iFrame Help!
          Level 7
          Here's basic iframe code to insert into your page:

          <iframe name="frame1" id="frame1" src="yourpage.html" scrolling="auto"
          frameborder="0" width="500" height="500">Your browser does not support
          iframes, please upgrade to a modern browser that does.</iframe>



          --Nancy O.
          Alt-Web Design & Publishing
          www.alt-web.com






          "designer_80" <webforumsuser@macromedia.com> wrote in message
          news:g7ac2s$dpn$1@forums.macromedia.com...
          > Firefox is fine but Internet Explorer is not showing the iframes. Is there
          a
          > possible fix or solution? Scrolling iframes don't scroll and some with
          images
          > don't show anything?
          >
          > I could really use some help.
          > Thanks.
          >


          • 2. Re: Need iFrame Help!
            designer_80 Level 1
            I tried IE7 but its not showing the iframes as well...? I know firefox is the better browser but there is a big number of people who still use IE.

            Can anyone help?
            • 3. Re: Need iFrame Help!
              Level 7
              How about posting a URL to your page so we can see the code and what else
              may be going on.

              --Nancy O.
              Alt-Web Design & Publishing
              www.alt-web.com


              "designer_80" <webforumsuser@macromedia.com> wrote in message
              news:g7ads0$fs9$1@forums.macromedia.com...
              > I tried IE7 but its not showing the iframes as well...? I know firefox is
              the better browser but there is a big number of people who still use IE.
              >
              > Can anyone help?


              • 4. Need iFrame Help!
                designer_80 Level 1
                I Could only put a couple of pieces... 1000 character max.
                =========================================================

                <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

                <script type="text/javascript">
                /***********************************************
                * IFrame SSI script II- © Dynamic Drive DHTML code library ( http://www.dynamicdrive.com)
                * Visit DynamicDrive.com for hundreds of original DHTML scripts
                * This notice must stay intact for legal use
                ***********************************************/

                //Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
                //Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
                var iframeids=["myframe"]

                //Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
                var iframehide="yes"

                var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split( "/")[1]
                var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

                function resizeCaller() {
                var dyniframe=new Array()
                for (i=0; i<iframeids.length; i++){
                if (document.getElementById)
                resizeIframe(iframeids )
                //reveal iframe for lower end browsers? (see var above):
                if ((document.all || document.getElementById) && iframehide=="no"){
                var tempobj=document.all? document.all[iframeids
                ] : document.getElementById(iframeids )
                tempobj.style.display="block"
                }
                }
                }

                function resizeIframe(frameid){
                var currentfr=document.getElementById(frameid)
                if (currentfr && !window.opera){
                currentfr.style.display="block"
                if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
                currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
                else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
                currentfr.height = currentfr.Document.body.scrollHeight;
                if (currentfr.addEventListener)
                currentfr.addEventListener("load", readjustIframe, false)
                else if (currentfr.attachEvent){
                currentfr.detachEvent("onload", readjustIframe) // Bug fix line
                currentfr.attachEvent("onload", readjustIframe)
                }
                }
                }

                function readjustIframe(loadevt) {
                var crossevt=(window.event)? event : loadevt
                var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
                if (iframeroot)
                resizeIframe(iframeroot.id);
                }

                function loadintoIframe(iframeid, url){
                if (document.getElementById)
                document.getElementById(iframeid).src=url
                }

                if (window.addEventListener)
                window.addEventListener("load", resizeCaller, false)
                else if (window.attachEvent)
                window.attachEvent("onload", resizeCaller)
                else
                window.onload=resizeCaller

                function MM_swapImage() { //v3.0
                var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
                if ((x=MM_findObj(a
                ))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
                }
                function MM_swapImgRestore() { //v3.0
                var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a )&&x.oSrc;i++) x.src=x.oSrc;
                }
                </script>
                </head>
                <body>

                <td width="219" height="307" valign="top"><iframe id="myframe" src="class_est_charleston_map_cin.html" scrolling="yes" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; height:306px; display:none"></iframe>
                <td width="5" valign="top"><div align="right"><img src="images/doors_line.jpg" width="5" height="283" /> </div></td>
                <td width="38" valign="top"><img src="../../images/spacer.gif" alt="" width="39" height="1" /></td>
                <td width="76" valign="top"><a href="javascript:loadintoIframe('myframe', 'class_est_charleston_map_coc.html')" target="_top" onclick="MM_nbGroup('down','group1','swatchesmaplecountryoff','images/swatches_maple_coun try_on.jpg',1)" onmouseover="MM_nbGroup('over','swatchesmaplecountryoff','images/swatches_maple_country_o ver.jpg','',1)" onmouseout="MM_nbGroup('out')"></a><a
                • 5. Re: Need iFrame Help!
                  Level 7
                  I see you are using a javascript to resize the iframe on page load according
                  to the src's content height. I know this script works because I have it
                  working on this page, but when you agressively resize viewport or text size,
                  you will need to refresh the page (F5) so the script can recalculate the
                  iframe's height.
                  http://alt-web.com/Backgrounds.shtml

                  Try this in your html:

                  <iframe name="myframe" id="myframe" src="class_est_charleston_map_cin.html"
                  scrolling="auto" allowtransparency="true" frameborder="0"
                  style="overflow:auto; width:100%; display:none">Your browser does not
                  support iframes, please upgrade to a modern browser that does.</iframe>

                  HTH,
                  --Nancy O.
                  Alt-Web Design & Publishing
                  www.alt-web.com


                  "designer_80" <webforumsuser@macromedia.com> wrote in message
                  news:g7b39s$7uj$1@forums.macromedia.com...
                  > <script src="Scripts/AC_RunActiveContent.js"
                  type="text/javascript"></script>
                  >
                  > <script type="text/javascript">
                  > /***********************************************
                  > * IFrame SSI script II- ? Dynamic Drive DHTML code library
                  > ( http://www.dynamicdrive.com)
                  > * Visit DynamicDrive.com for hundreds of original DHTML scripts
                  > * This notice must stay intact for legal use
                  > ***********************************************/
                  >
                  > //Input the IDs of the IFRAMES you wish to dynamically resize to match
                  its
                  > content height:
                  > //Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or
                  > ["myframe"] or [] for none:
                  > var iframeids=["myframe"]
                  >
                  > //Should script hide iframe from browsers that don't support this script
                  (non
                  > IE5+/NS6+ browsers. Recommended):
                  > var iframehide="yes"
                  >
                  > var
                  >
                  getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Fire
                  fox"
                  > )).split("/")[1]
                  > var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in
                  px
                  > to add to iframe in FireFox 1.0+ browsers
                  >
                  > function resizeCaller() {
                  > var dyniframe=new Array()
                  > for (i=0; i<iframeids.length; i++){
                  > if (document.getElementById)
                  > resizeIframe(iframeids )
                  > //reveal iframe for lower end browsers? (see var above):
                  > if ((document.all || document.getElementById) && iframehide=="no"){
                  > var tempobj=document.all? document.all[iframeids
                  ] :
                  > document.getElementById(iframeids )
                  > tempobj.style.display="block"
                  > }
                  > }
                  > }
                  >
                  > function resizeIframe(frameid){
                  > var currentfr=document.getElementById(frameid)
                  > if (currentfr && !window.opera){
                  > currentfr.style.display="block"
                  > if (currentfr.contentDocument &&
                  currentfr.contentDocument.body.offsetHeight)
                  > //ns6 syntax
                  > currentfr.height =
                  currentfr.contentDocument.body.offsetHeight+FFextraHeight;
                  > else if (currentfr.Document && currentfr.Document.body.scrollHeight)
                  //ie5+
                  > syntax
                  > currentfr.height = currentfr.Document.body.scrollHeight;
                  > if (currentfr.addEventListener)
                  > currentfr.addEventListener("load", readjustIframe, false)
                  > else if (currentfr.attachEvent){
                  > currentfr.detachEvent("onload", readjustIframe) // Bug fix line
                  > currentfr.attachEvent("onload", readjustIframe)
                  > }
                  > }
                  > }
                  >
                  > function readjustIframe(loadevt) {
                  > var crossevt=(window.event)? event : loadevt
                  > var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget :
                  > crossevt.srcElement
                  > if (iframeroot)
                  > resizeIframe(iframeroot.id);
                  > }
                  >
                  > function loadintoIframe(iframeid, url){
                  > if (document.getElementById)
                  > document.getElementById(iframeid).src=url
                  > }
                  >
                  > if (window.addEventListener)
                  > window.addEventListener("load", resizeCaller, false)
                  > else if (window.attachEvent)
                  > window.attachEvent("onload", resizeCaller)
                  > else
                  > window.onload=resizeCaller
                  >
                  > function MM_swapImage() { //v3.0
                  > var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
                  > for(i=0;i<(a.length-2);i+=3)
                  > if ((x=MM_findObj(a
                  ))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
                  > x.oSrc=x.src; x.src=a[i+2];}
                  > }
                  > function MM_swapImgRestore() { //v3.0
                  > var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a )&&x.oSrc;i++)
                  > x.src=x.oSrc;
                  > }
                  > </script>
                  > </head>
                  > <body>
                  >
                  > <td width="219" height="307" valign="top"><iframe
                  id="myframe"
                  > src="class_est_charleston_map_cin.html" scrolling="yes" marginwidth="0"
                  > marginheight="0" frameborder="0" vspace="0" hspace="0"
                  style="overflow:visible;
                  > width:100%; height:306px; display:none"></iframe>
                  > <td width="5" valign="top"><div align="right"><img
                  > src="images/doors_line.jpg" width="5" height="283" /> </div></td>
                  > <td width="38" valign="top"><img
                  src="../../images/spacer.gif"
                  > alt="" width="39" height="1" /></td>
                  > <td width="76" valign="top"><a
                  > href="javascript:loadintoIframe('myframe',
                  > 'class_est_charleston_map_coc.html')" target="_top"
                  >
                  onclick="MM_nbGroup('down','group1','swatchesmaplecountryoff','images/swatch
                  es_m
                  > aple_country_on.jpg',1)"
                  >
                  onmouseover="MM_nbGroup('over','swatchesmaplecountryoff','images/swatches_ma
                  ple_
                  > country_over.jpg','',1)" onmouseout="MM_nbGroup('out')"></a><a
                  >


                  • 6. Re: Need iFrame Help!
                    designer_80 Level 1
                    Nancy O,
                    I'm at work on a mac so I don't know if it fixed it yet. But just on a side note my iframes issue is also occuring in safari on the mac... :( but your revised code seems to still work in FF.

                    iframe should work in IE7 correct? for some reason the page that goes in the iframe is not loading.... (still investigating)

                    Any other suggestions would be great...
                    • 7. Re: Need iFrame Help!
                      designer_80 Level 1
                      The pages that should open in the iframes are blank like the following;

                      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                      <html xmlns=" http://www.w3.org/1999/xhtml">
                      <head>
                      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                      <title>lexington_maple_cinnamon</title>
                      <style type="text/css">
                      <!--

                      @import url("../../ayasite.css");
                      body {
                      background-image: url(images/door_bg.jpg);
                      margin-top: 0px;
                      margin-right: 0px;
                      margin-left: 0px;
                      }
                      </style>
                      </head>

                      <body class="text">
                      <table width="219" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->

                      <tr>
                      <td width="219" height="236" valign="top" background="images/door_lexington_cin_map.jpg"><p><br />
                      </p></td>
                      </tr>

                      <tr>
                      <td height="47" valign="top"><div align="center">
                      <p class="smalltext">* Also available in <a href="../species/handfinishes_wood.html" target="_parent" class="smalltext">Mocha, Frosted and<br />
                      Blackened</a> versions of this finish.</p>
                      </div></td>
                      </tr>
                      </table>
                      </body>

                      </html>
                      • 8. Re: Need iFrame Help!
                        designer_80 Level 1
                        If I remove the tables in the page that is getting loaded into the iframe I am able to then see the page. But I then get scroll bars.. and the layout breaks... :(

                        Weird thing is some pages have tables and they still load in an iframe. ???
                        • 9. Re: Need iFrame Help!
                          Level 7
                          designer_80,
                          You really need to post a URL to the site. I can't make out what is
                          happening from your snippets of code. To give meaningful feedback, I need
                          to see the working iframe page, and the src page being called into the
                          iframe.


                          --Nancy O.
                          Alt-Web Design & Publishing
                          www.alt-web.com





                          "designer_80" <webforumsuser@macromedia.com> wrote in message
                          news:g7f8gh$1rv$1@forums.macromedia.com...
                          > If I remove the tables in the page that is getting loaded into the iframe
                          I am
                          > able to then see the page. But I then get scroll bars.. and the layout
                          > breaks... :(
                          >
                          > Weird thing is some pages have tables and they still load in an iframe.
                          ???
                          >


                          • 10. Re: Need iFrame Help!
                            designer_80 Level 1
                            Sorry about that... I been going crazy trying to fix multiple things.... here is the URL: http://www.myaya.ca/aya2demo/products/doorstyles/class_est_lexington_maple.html

                            I hope you find a fix... or even a very close alternative. But a fix would be ideal.

                            Thanks Nancy