Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default [HELP] Expandable iFrames?

    Hello there,
    I just wonder if someone knows the HTML code for the expandable iframe, or the scripts.. (i don't know what it is)
    For ex; www.clubhabbo.net >> Their content box, it's small, but get's bigger..

    PS: I don't mean the expandable content box

    If you can help me, you'll get a +rep

    :eusa_whis

  2. #2
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    The answer is more complicated than you think. You have to code a layout in a special way that allows the box(es) to expand, then add a special javascript code to make the iframe expand (if you add it without coding the layout correctly then the layout will just ruin when the iframe expands). Photoshop or anything like that won't code it correctly for expandables. I suggest CSS and DIVs, SS does a good tutorial which will help you get the hang of it here:

    http://habboxforum.com/showthread.php?t=453923

    Hope that helps.
    Last edited by iUnknown; 27-02-2008 at 10:35 PM.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  3. #3
    Join Date
    Dec 2007
    Posts
    412
    Tokens
    0

    Default

    If you would search deep enough, you'd notice that there is a tutorial on the forum describing just this!

  4. #4
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Quote Originally Posted by php.net View Post
    If you would search deep enough, you'd notice that there is a tutorial on the forum describing just this!
    As linked by me :rolleyes:

    http://habboxforum.com/showthread.php?t=453923
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  5. #5
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default Yes but..

    Quote Originally Posted by iUnknown View Post
    The answer is more complicated than you think. You have to code a layout in a special way that allows the box(es) to expand, then add a special javascript code to make the iframe expand (if you add it without coding the layout correctly then the layout will just ruin when the iframe expands). Photoshop or anything like that won't code it correctly for expandables. I suggest CSS and DIVs, SS does a good tutorial which will help you get the hang of it here:

    http://habboxforum.com/showthread.php?t=453923

    Hope that helps.
    Hello,
    My layout is coded in div's, and it's expandable.. Where can i find the IFRAME that expands now? Because normal IFRAMES usually just scrolls.

    Thanks,

  6. #6
    Join Date
    Dec 2007
    Posts
    412
    Tokens
    0

    Default

    Quote Originally Posted by iUnknown View Post
    Wrong.

    Edited by LucasAge (Forum Super Moderator): Please do not post pointlessly.
    Last edited by Agesilaus; 29-02-2008 at 11:44 PM.

  7. #7
    RedCrisps Guest

    Default

    just rip there code. its not like they own it. DynamicDrive.com does. they just removed the copyright notice

  8. #8
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by RedCrisps View Post
    just rip there code. its not like they own it. DynamicDrive.com does. they just removed the copyright notice
    Quoted for truth. I remember putting it in on ch and either being told to remove it or someone else did, not too sure on that.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  9. #9
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default

    But how should i know which code it is? :S

  10. #10
    Join Date
    Dec 2007
    Posts
    412
    Tokens
    0

    Default

    I shouldn't do this, as if you are wanting to create a website, you should know how to.

    To hell, here it is.

    Javascript code:
    PHP Code:
    // Expandable Iframe script from DynamicDrive.

    var iframeids=["content"]
    var 
    iframehide="yes"
    var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
    var 
    FFextraHeight=parseFloat(getFFVersion)>=0.147 0
    /*
    Internet explorer seems to think it can make it's own rules about the internet.
    */
    function resizeCaller() {
    var 
    dyniframe=new Array()
    for (
    i=0i<iframeids.lengthi++){
    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.alldocument.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"readjustIframefalse)
    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(iframeidurl){
    if (
    document.getElementById)
    document.getElementById(iframeid).src=url
    }

    if (
    window.addEventListener)
    window.addEventListener("load"resizeCallerfalse)
    else if (
    window.attachEvent)
    window.attachEvent("onload"resizeCaller)
    else
    window.onload=resizeCaller 
    iFrame code:
    HTML Code:
    <iframe src="PAGE HERE.php" width="100%" id="content" marginwidth="1" marginheight="1" name="content" scrolling="no" border="0" frameborder="0" allowtransparency="yes"></iframe>

Page 1 of 3 123 LastLast

Posting Permissions

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