Better alternative to an iframe to display tab content?
css, html, iframe, javascript, tabs
Solution
The only alternative to using IFRAMEs to load dynamic content (after the page has loaded) is using AJAX to update a container on your web page. It's pretty elegant and usually faster than loading a full page structure into an IFRAME.
- Ajax with JQuery (use this and you will be loved on SO; the AJAX functions are great and simple)
- Ajax with Prototype
- Ajax with MooTools
- Standalone Ajax with Matt Kruse's AJAX toolbox (Used to use this, using JQuery today because I needed a framework)
- AJAX with Dojo (Said to be fast, but AJAX is not as straightforward)
Problem
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, because 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: ``` <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> ```