Results 1 to 2 of 2

Thread: Better Alternative to iFrames?

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Better Alternative to iFrames?

    Hi. I have a page with an iFrame to feature the contents of the clicked tab. There are 3 tabs, and 1 iFrame. The sources of the contents relating to each tab clicked are formatted and coded in other html & css files. What is another alternative to using an iFrame, cause I noticed that when the tab is clicked, it still shows the white background, similar to when a new page is loading?

    Here's my code:

    Code:
    <div id="tabs">
        <div id="overview">
          <a target="tabsa" class="imagelink lookA" href="toframe.html">Overviews</a>
        </div>
        <div id="gallery">
          <a target="tabsa" class="imagelink lookA" href="tawagpinoygallery.html">Gallery</a>
        </div>
        <div id="reviews">
          <a target="tabsa" class="imagelink lookA" href="trframe.html">Reviews</a>
        </div>
        </div>
        
        <div id="tabs-1">
          <iframe src="toframe.html" name= "tabsa" width="95%" height="100%" frameborder="0">
          </iframe>
        </div>
    Thanks in advance for the help!!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I don't know about better, different would be AJAX. It relies upon javascript though, and is more difficult to work with if you are loading various contents with different styles. Javascript on imported pages can be problematic. All pages must be on the same domain.

    On the plus side there is no page loading effect in IE (flashing white like you mention), though there can be delays while the server fetches the page, just like with iframe. AJAX imported content is a little easier to fit into your layout if you want its container to adapt to the size of the imported content.

    See:

    http://www.dynamicdrive.com/dynamicindex17/indexb.html

    Particularly:

    http://www.dynamicdrive.com/dynamici...tent/index.htm
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •