Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: Embedded Pages?

  1. #1
    Junior Member
    Join Date
    Dec 2007
    Posts
    3
    Member #
    16278
    On my site I would like for users to be able to look at diffrent pages without leaving the original page. I'm sure there is information about doing this on the site but I do not know what it is called. I want to say embedded pages but unsure.
    Any infomation? Thanks very much!

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Sounds to me like you mean iframes

    What you do is have an iframe where you want the content to aooear and then you would have your links, but in the links you would have an attribute called target which would match the name of your iframe. When the link is clicked the iframe will reload but not the whole page.

    Short example:
    HTML Code:
    <body>
     <h1>Iframe</h1>
    
     <a href="link1.html" target="myIFrame">Link 1</a>
     <a href="link2.html" target="myIFrame">Link 2</a> 
     <a href="link3.html" target="myIFrame">Link 3</a>
    
    <iframe width="500" height="500" name="myIFrame" frameborder="0" /></iframe>
    
    </body>

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    as bfsog says ... <iframe> inline frame.

    Keep in mind that if a user clicks any links within the iframe,
    that link will open the new site in the same iframe. This
    might cause confusion because it messes up the browser
    back button ... remember they are actually viewing your site.

    If the other pages are your own (not some other URL's) ...
    you can control the links on the pages that appear within
    the <iframe> ... making them return to your "top" page.

    The other option is <frame> ...
    as you'll find out, nobody like frames. Search engines
    hate them too. Try not to use frames.


  5. #4
    Junior Member
    Join Date
    Dec 2007
    Posts
    3
    Member #
    16278
    Iframes, that's it!

    So should iframes be avoided?

  6. #5
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Yes, for a number of reasons. Firstly, they don't render properly sometimes, mainly in IE, where they can ignore CSS z-index values, and damage various scripts. Second, as sometimes I have to point out to many people, on some browsers clicking a link in the frame will open the page in the frame, instead of the entire window, which can be problematic. Third, there are usually better alternatives at each job of the iframe (sometimes for allowing scrollbars on an element, which can be replicated with CSS, or for the multi-page system mentioned here).

    AJAX, or, perhaps to make it easier, AHAH, is the use of Javascript to load pages and do something with them, perhaps including placing the loaded page to somewhere within the DOM. Don't worry, Javascript libraries usually make this an easy task. The good thing about using AJAX is that you therefore have much better flexibility. For example, you could load a "waiting" message while the page is being loaded (which is often much appreciated by users). You can also collapse (with a nice animation) the element while it's loading, such as what the popular Lightbox does. The list goes on and on. Iframes are ok, but aren't recommended, in my opinion.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Of course AJAX has the problem of only working when Javascript is enabled. If you do decide to use AJAX, make sure your site will still work when there is no Javascript to speak of.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:39 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com