Results 1 to 1 of 1

Thread: Iframe expand etc probs driving me mad.

  1. #1
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Iframe expand etc probs driving me mad.

    hey all okay basically here is my website www.krazylivemix.co.uk

    i have been trying my best to get a expandable iframe too work.
    i found a script on dynamic drive the iframe ss1 script 1 and 2, they both work with i.e safari but not with firefox.

    so ive been looking around and found a new script which is brilliant loads perfect for what i need, the problem i have now is that the id is set to content.

    so the iframe, the script and the buttons linking to different pages have the ID content.

    so it should load the other pages in same iframe but, it doesn't now previously it did by the way i did it but now it doesn't its a nightmare can anyone help, btw im a beginner in java and web developement so please be nice.

    index source.
    HTML Code:
    <!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>
    <script type="text/javascript">
    
    function resizeIframe(){
      var ifr = document.getElementById("content");
      var ifrBody = ifr.contentWindow.document[getDocBody(ifr.contentWindow)];
      ifr.style.height=ifrBody.scrollHeight+"px";
    }
    
    function getDocBody(win){
      if (!win) win=window;
      if (win.document.compatMode && win.document.compatMode != 'BackCompat') { //standards compliant mode 
        return "documentElement";
      }
      return "body";
    }
    </script>
    <script type="text/javascript">
    function openpopup(popurl){
    var winpops=window.open(popurl,"","width=639px,height=550px")
    }
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    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[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    </script>
    
    <style type="text/css">
    <!--
    body {
    	background-image: url(Layout/bg1.png);
    	margin-top: 0px;
    }
    a {
    	font-family: Century Gothic;
    	font-size: 18px;
    	color: #FFFFFF;
    }
    a:link {
    	text-decoration: none;
    }
    a:visited {
    	text-decoration: none;
    	color: #FFFFFF;
    }
    a:hover {
    	text-decoration: none;
    	color: #00CCFF;
    }
    a:active {
    	text-decoration: none;
    	color: #F0F0F0;
    }
    .style4 {
    	color: #FFFFFF;
    	font-family: "Century Gothic";
    	font-size: 14px;
    	font-weight: bold;
    }
    .style5 {font-size: 14px}
    -->
    </style>
    <title>KrazyLivemix // We Do Really Mean Business.</title></head>
    
    <body onLoad="MM_preloadImages('Layout/home1.1.png','Layout/onair1.1.png','Layout/schedule1.1.png','Layout/music1.1.png','Layout/contact1.1.png','Layout/news1.1.png','Layout/Forums1.1.png','Layout/live1.1.png')">
    <table width="979" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="197" background="Layout/Banner.png"><table width="980" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="209">&nbsp;</td>
            <td width="336" height="197" valign="top"><table width="336" height="145" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="50"><table width="336" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="126" height="43">&nbsp;</td>
                    <td width="210"><iframe id="fan" name="fan" frameborder="0" width="210" scrolling="No" height="55" allowtransparency="allowtransparency" src="/djstats.php"></iframe></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="38">&nbsp;</td>
              </tr>
              <tr>
                <td height="52" align="center" valign="top"><iframe id="fan2" name="fan" frameborder="0" width="310" scrolling="No" height="55" allowtransparency="allowtransparency" src="/songstats.php"></iframe></td>
              </tr>
    
            </table></td>
            <td width="435" valign="top"><table width="435" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="52">&nbsp;</td>
              </tr>
              <tr>
                <td height="80" valign="middle"><table width="435" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="25" height="74">&nbsp;</td>
                    <td width="393" valign="top"><img src="/images/comet.gif" width="393" height="74" alt="" /></td>
                    <td width="17">&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="36" valign="top"><table width="435" height="34" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="109" height="34">&nbsp;</td>
                    <td width="326" valign="middle"></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td valign="top"><a href="content.htm" target="content" onMouseOver="MM_swapImage('home','','Layout/home1.1.png',1)" onMouseOut="MM_swapImgRestore()"><img src="Layout/home1.png" name="home" width="107" height="38" border="0"></a><a href="webpages/onair.htm" target="content" onMouseOver="MM_swapImage('onair','','Layout/onair1.1.png',1)" onMouseOut="MM_swapImgRestore()"><img src="Layout/onair1.png" name="onair" width="109" height="38" border="0"></a><a href="webpages/schedule.html" target="content" onMouseOver="MM_swapImage('schedule','','Layout/schedule1.1.png',1)" onMouseOut="MM_swapImgRestore()"><img src="Layout/schedule1.png" name="schedule" width="145" height="38" border="0"></a><a href="webpages/music.htm" target="content" onMouseOver="MM_swapImage('music','','Layout/music1.1.png',1)" onMouseOut="MM_swapImgRestore()"><img src="Layout/music1.png" name="music" width="105" height="38" border="0"></a><a href="webpages/contact.php" target="content" onMouseOver="MM_swapImage('contact','','Layout/contact1.1.png',1)" onMouseOut="MM_swapImgRestore()"><img src="Layout/contact1.png" name="contact" width="129" height="38" border="0"></a><a href="webpages/news.htm" target="content" onMouseOver="MM_swapImage('news','','Layout/news1.1.png',1)" onMouseOut="MM_swapImgRestore()"><img src="Layout/news1.png" name="news" width="104" height="38" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('forum','','Layout/Forums1.1.png',1)"><img src="Layout/Forums1.png" name="forum" width="120" height="38" border="0"></a><a href="javascript:openpopup('/webpages/listenlive.htm')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('listen','','Layout/live1.1.png',1)"><img src="Layout/live1.png" name="listen" width="138" height="38" border="0"></a><img src="Layout/other.png" width="22" height="38" border="0"><br />
        <img src="Layout/bottomstripborder1.png" width="980" height="5" border="0" align="top" /></td>
      </tr>
      <tr>
        <td valign="top" background="Layout/bottomstripborder1.png"><iframe id="content" src="content.htm" style="width:100%;height:200px;" frameborder="0" onload="resizeIframe();"></iframe> </td>
      </tr>
      <tr>
        <td height="25" align="center" valign="middle" background="Layout/bottomstripborder.png"><span class="style4">All rights reserved ęcopyright protected to krazylivemix.co.uk 2009 - 2011.</span></td>
      </tr>
      <tr>
        <td height="25" background="Layout/bottomstrip1.png"><div align="center" class="style4">DreamhostUK l <a href="http://www.themixradio.co.uk" target="_blank" class="style5">TheMixRadio</a> l <a href="http://www.howsiesvoiceovers.co.uk" target="_blank" class="style5">HowsieVoiceovers</a> l <a href="http://www.adrmedia.com" target="_blank" class="style5">ADRMedia</a></div></td>
      </tr>
    </table>
    </body>
    </html>
    ive been playing about with codes and ive fixed the links with iframes as well as resize iframe, the only problem i have now is the original page is 1000px height but rest are 710px so there is a huge gap anyway ican resize back to max do not say go get ssi script they dont work on ff.
    Last edited by buncman; 04-12-2009 at 11:25 PM. Reason: more information

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •