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!


Results 1 to 6 of 6

Thread: Iframes?

  1. #1
    Join Date
    Oct 2006
    Posts
    12,405
    Tokens
    0

    Latest Awards:

    Default Iframes?

    One last thing lol, I'm making too many threads .

    Am I right in thinking that an Iframe is what's needed if you want each page to be the same except the content area?

    If that's correct, does the Iframe for each page eg: News, Guides, etc. just have to contain the actual content for that specific page (i.e. text and formatting)?

    If I'm going to use a scroll bar (only to appear when needed), should this be in the div or the Iframe (which would be inside the div anyway)? And finally, what would be the correct code to use one?

    Thankies
    Last edited by Black_Apalachi; 11-11-2008 at 01:57 PM.

  2. #2

    Default

    The page the iframe links to has to be a webpage like on your normal site not just the styling - it's got to have proper mark-up, head, body, doctype etc. Secondly you don't have to use iframes but since it's an almost guarateed to work in all browsers unlike using AJAX requests which the user could have javascript disabled. Thirdly the scroll bar is a part of the iframe and in Internet Explorer displays by default. As for how to code one have a look at this page http://www.w3.org/TR/REC-html40/present/frames.html.

  3. #3
    Join Date
    Oct 2006
    Posts
    12,405
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Iszak View Post
    The page the iframe links to has to be a webpage like on your normal site not just the styling - it's got to have proper mark-up, head, body, doctype etc. Secondly you don't have to use iframes but since it's an almost guarateed to work in all browsers unlike using AJAX requests which the user could have javascript disabled. Thirdly the scroll bar is a part of the iframe and in Internet Explorer displays by default. As for how to code one have a look at this page http://www.w3.org/TR/REC-html40/present/frames.html.
    Oh of course yeah . Thanks .

  4. #4
    Join Date
    Oct 2006
    Posts
    12,405
    Tokens
    0

    Latest Awards:

    Default

    I can't get my head round how to do this (don't worry I'm not making yet another thread ).

    You've probably seen my layout (link in sig), from left to right it has the banner, then the navigation, then a content box anf then there are two other boxes underneath these. I have an iframe in the main right-hand content box.

    Ok, how I'm imagining the site to work is that when a navigation link is clicked (e.g. "News"), instead of opening a whole new page, it just opens the news content page in the iframe. Therefore the rest of the page (i.e. the two bottom boxes and the overall layout, banner etc) remains the same for every navigation link.

    Is this how an iframe works and am I thinking about it the right way?

    So I think what I'm trying to ask is, how do you make a navigation link open a content document in the iframe?

  5. #5
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    2,015
    Tokens
    568

    Latest Awards:

    Default

    Quote Originally Posted by Robald View Post
    I can't get my head round how to do this (don't worry I'm not making yet another thread ).

    You've probably seen my layout (link in sig), from left to right it has the banner, then the navigation, then a content box anf then there are two other boxes underneath these. I have an iframe in the main right-hand content box.

    Ok, how I'm imagining the site to work is that when a navigation link is clicked (e.g. "News"), instead of opening a whole new page, it just opens the news content page in the iframe. Therefore the rest of the page (i.e. the two bottom boxes and the overall layout, banner etc) remains the same for every navigation link.

    Is this how an iframe works and am I thinking about it the right way?

    So I think what I'm trying to ask is, how do you make a navigation link open a content document in the iframe?
    Code:
    <a href="URL" target="IFRAMENAME">link</a>

  6. #6
    Join Date
    Oct 2006
    Posts
    12,405
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Trinity View Post
    Code:
    <a href="URL" target="IFRAMENAME">link</a>
    Thanks. I have kind of made it work using that, but I'm still unsure on something. I imagine this code is probably wrong but the "nav 1" div is where the link will be and iframe in the "main_middle" div is where the content will show (once the link is clicked).

    Code:
    <div id="nav_1">
    <a href="/hello.html" target="hello">link</a>
    </div>
    <div id="main_middle">
    <IFRAME NAME="hello" SRC="hello.html" WIDTH=480 HEIGHT=350 FRAMEBORDER=0 MARGINWIDTH=auto MARGINHEIGHT=auto></IFRAME>
    </div>
    ...But if there are several links, would I put all their targets in the "main_middle" div (in seprate iframes or not)? I don't get how doing that wouldn't make all the content pages show at the same time though .

Posting Permissions

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