Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    A phpbb forum in a Iframe (HELP)

    Hello guys!
    i want to put a phpbb forum (cwalk.nl) to see what i mean.
    I want to load this forum in to a i frame (www.cwalk.nl/forum2/cwalknl/forum/)

    as you can see , that doesn't work.
    i tried to say the height is about 4000 * then the forum will fitt perfect BUT
    if you go all the way down and click on a link and you get a page that's shorter you got a problem.
    because your screen won't go up , so you will see a black page and you have to scroll up to see the forum.

    and that doens't work verry well.

    so pleaze help me.

    how can i make sure it always fit's


    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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Naamloos document</title>
    <style type="text/css">
    <!--
    body {
    	background-color: #161616;
    }
    -->
    </style></head>
    </head>
    <body>
    <table width="1024" height="68" border="0" cellpadding="0" cellspacing="0" id="Table_01">
      <tr>
        <td><a href="http://www.cwalk.nl/"
    		onmouseover="image1.src='images/mousover_01.gif';"
    		onmouseout="image1.src='images/index_01.gif';"> <img src="images/index_01.gif" alt="portal" name="image1" width="107" height="68" border="0" id="image1" /></a></td>
        <td><a href="http://www.cwalk.nl/forum"
    		onmouseover="image2.src='images/mousover_02.gif';"
    		onmouseout="image2.src='images/index_02.gif';"><img src="images/index_02.gif" alt="forum" name="image2" width="87" height="68" border="0" id="image2" /></a></td>
        <td><a href="http://www.cwalk.nl/koth"
    		onmouseover="image3.src='images/mousover_03.gif';"
    		onmouseout="image3.src='images/index_03.gif';"> <img src="images/index_03.gif" alt="koth" name="image3" width="72" height="68" border="0" id="image3" /></a></td>
        <td><a href="http://www.cwalk.nl/tv"
    		onmouseover="image4.src='images/mousover_04.gif';"
    		onmouseout="image4.src='images/index_04.gif';"><img src="images/index_04.gif" alt="tv" name="image4" width="48" height="68" border="0" id="image4" /></a></td>
        <td><img src="images/index_05.gif" alt="balk" width="710" height="68" align="baseline" /></td>
      </tr>
    </table>
    <iframe src="http://www.cwalk.nl/forum/index.php" frameborder="0" scrolling="no" width="100&#37;"  style="height: 100%" ></iframe>
    </body>
    </html>

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    As long as the forum is hosted on the same server as the page with the iframe then you can use javascript.

    http://www.dynamicdrive.com/dynamici...iframessi2.htm
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i did what the script said but it still doesn't work
    see
    www.cwalk.nl/forum2/cwalknl/forum/
    more help needed !

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You didn't use the script I pointed you to.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes i did.
    I copyed the script into my head
    and i took the iframe of the example

    See this is my script now !

    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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Naamloos document</title>
    <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="no"
    
    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[i])
    //reveal iframe for lower end browsers? (see var above):
    if ((document.all || document.getElementById) && iframehide=="no"){
    var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
    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
    
    </script>
    <style type="text/css">
    <!--
    body {
    	background-color: #161616;
    }
    -->
    </style></head>
    </head>
    <body>
    <table width="1024" height="68" border="0" cellpadding="0" cellspacing="0" id="Table_01">
      <tr>
        <td><a href="http://www.cwalk.nl/"
    		onmouseover="image1.src='images/mousover_01.gif';"
    		onmouseout="image1.src='images/index_01.gif';"> <img src="images/index_01.gif" alt="portal" name="image1" width="107" height="68" border="0" id="image1" /></a></td>
        <td><a href="http://www.cwalk.nl/forum"
    		onmouseover="image2.src='images/mousover_02.gif';"
    		onmouseout="image2.src='images/index_02.gif';"><img src="images/index_02.gif" alt="forum" name="image2" width="87" height="68" border="0" id="image2" /></a></td>
        <td><a href="http://www.cwalk.nl/koth"
    		onmouseover="image3.src='images/mousover_03.gif';"
    		onmouseout="image3.src='images/index_03.gif';"> <img src="images/index_03.gif" alt="koth" name="image3" width="72" height="68" border="0" id="image3" /></a></td>
        <td><a href="http://www.cwalk.nl/tv"
    		onmouseover="image4.src='images/mousover_04.gif';"
    		onmouseout="image4.src='images/index_04.gif';"><img src="images/index_04.gif" alt="tv" name="image4" width="48" height="68" border="0" id="image4" /></a></td>
        <td><img src="images/index_05.gif" alt="balk" width="710" height="68" align="baseline" /></td>
      </tr>
    </table>
    <iframe id="myframe" src="http://www.cwalk.nl/forum/index.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>
    </body>
    </html>

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Please update your previous code with your new code on the server.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    how do you mean ?

    i did

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    This is what you have on your site now
    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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Naamloos document</title>
    <style type="text/css">
    <!--
    body {
    	background-color: #161616;
    }
    -->
    </style></head>
    <script type="text/javascript">
    /*************************************************************************
    This code is from Dynamic Web Coding at http://www.dyn-web.com/
    See Terms of Use at http://www.dyn-web.com/bus/terms.html
    regarding conditions under which you may use this code.
    This notice must be retained in the code as is!
    *************************************************************************/
    
    function getDocHeight(doc) {
    var docHt = 0, sh, oh;
    if (doc.height) docHt = doc.height;
    else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
    }
    return docHt;
    }
    
    function setIframeHeight(iframeName) {
    var iframeWin = window.frames[iframeName];
    var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
    if ( iframeEl && iframeWin ) {
    iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous
    var docHt = getDocHeight(iframeWin.document);
    // need to add to height to be sure it will all show
    if (docHt) iframeEl.style.height = docHt + 30 + "px";
    }
    }
    
    function loadIframe(iframeName, url) {
    if ( window.frames[iframeName] ) {
    window.frames[iframeName].location = url;
    return false;
    }
    else return true;
    }
    </script>
    </head>
    <body>
    <table width="1024" height="68" border="0" cellpadding="0" cellspacing="0" id="Table_01">
      <tr>
        <td><a href="http://www.cwalk.nl/"
    		onmouseover="image1.src='images/mousover_01.gif';"
    		onmouseout="image1.src='images/index_01.gif';"> <img src="images/index_01.gif" alt="portal" name="image1" width="107" height="68" border="0" id="image1" /></a></td>
    
        <td><a href="http://www.cwalk.nl/forum"
    		onmouseover="image2.src='images/mousover_02.gif';"
    		onmouseout="image2.src='images/index_02.gif';"><img src="images/index_02.gif" alt="forum" name="image2" width="87" height="68" border="0" id="image2" /></a></td>
        <td><a href="http://www.cwalk.nl/koth"
    		onmouseover="image3.src='images/mousover_03.gif';"
    		onmouseout="image3.src='images/index_03.gif';"> <img src="images/index_03.gif" alt="koth" name="image3" width="72" height="68" border="0" id="image3" /></a></td>
        <td><a href="http://www.cwalk.nl/tv"
    		onmouseover="image4.src='images/mousover_04.gif';"
    		onmouseout="image4.src='images/index_04.gif';"><img src="images/index_04.gif" alt="tv" name="image4" width="48" height="68" border="0" id="image4" /></a></td>
        <td><img src="images/index_05.gif" alt="balk" width="710" height="68" align="baseline" /></td>
      </tr>
    </table>
    <iframe src="http://www.cwalk.nl/forum/index.php" frameborder="0" scrolling="no" width="100&#37;"  style="height: 100%" ></iframe>
    </body>
    </html>
    Its not the code you just posted.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #9
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OMG sorry your right .
    and it works . thank you very much !!!


  •  

    Posting Permissions

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