954,198 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

faster loading iframe or better way

Im using an iframe to display data (recent topics) but im wondering if there is a better way to do this that will not slow page loading as much?

hereis current code

<table width="83%" td align="center" cellspacing="0" id="submenu">
<tr>
<td align=left>

<table width="100%" height="80px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="row1" width="100%" style="text-align:center"><marquee behavior=scroll direction=up scrollamount=4 onmouseover=this.stop() onmouseout=this.start() id="activetomar"></marquee></td>
</font>
</td></tr></table></td></tr></table>
<script language="javascript" type="text/javascript">
<!--
if(self.location.href.match('http://herproom.5.forumer.com/index.php?act=Search&CODE=getactive')){
actm = document.getElementById('activetomar');
actm.innerHTML += "<table class='tableborder'>Active Topics Removed</table>"
}
else {
document.write("<iframe name='activetopmarq' src='{ibf.script_url}act=Search&CODE=getactive' style='display:none;' onload='latemarqHarvest()'></iframe>");
//-->
function latemarqHarvest()
{
martab = window.frames["activetopmarq"].document.getElementsByTagName("table");
for(var i = 0; i < martab.length; i++){
if(martab[i].className == "tablebasic" && martab[i].parentNode.className == "tableborder"){
tabdiv = martab[i].innerHTML
goingNav(tabdiv)
}
}
}
function goingNav(tabdiv)
{
actm = document.getElementById('activetomar');
actm.innerHTML += "<table class='tableborder'>" + tabdiv + "</table>";
}
}
//-->
</script>
Inny
Posting Whiz in Training
293 posts since Oct 2005
Reputation Points: 11
Solved Threads: 6
 

BUMP! Faster way to load/display this? css perhaps?

Inny
Posting Whiz in Training
293 posts since Oct 2005
Reputation Points: 11
Solved Threads: 6
 

Bump! some help here please? Anyway to make this function faster? is there a faster way to do this? Its just too slow!

Inny
Posting Whiz in Training
293 posts since Oct 2005
Reputation Points: 11
Solved Threads: 6
 

Anyone Know a less time (loading) consuming way to do this?

Inny
Posting Whiz in Training
293 posts since Oct 2005
Reputation Points: 11
Solved Threads: 6
 

No. It is still going to load the entire page. Code changes won't speed up data transfer.

The only thing I can think of is to break it into several loads, and display the first one before loading the others.

MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 

It dosent display the whole page, only links inside an iframe.

Inny
Posting Whiz in Training
293 posts since Oct 2005
Reputation Points: 11
Solved Threads: 6
 

But the browser doesn't know that. It loads everything in the frame before it can render it.

MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 

oh could ajax be used to do faster???

Inny
Posting Whiz in Training
293 posts since Oct 2005
Reputation Points: 11
Solved Threads: 6
 

Could I use css to display this data?

Inny
Posting Whiz in Training
293 posts since Oct 2005
Reputation Points: 11
Solved Threads: 6
 

Why did you ask and answer your own questions? First, why are you using both iframes and tables...redundant much...?

You have to transfer the html, css, JS to the browser...BUT then the JS has to process the data and the iframe content must load... if it is loaded superfluous data prior to JS determining what to show, you have a couple options.... but loose the tables if at all possible...just use CSS to position the iframe...

You can use ajax or you can move some logic to the server, or you can break content into logical groups and have JS on client load smaller pieces, but only what is required for display...
You are using PHP it seems, so the PHP code on the server may also be running slow due design issues...

rgtaylor
Junior Poster in Training
88 posts since Mar 2007
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You