944,107 Members | Top Members by Rank

Ad:
Feb 21st, 2007
0

faster loading iframe or better way

Expand Post »
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

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <table width="83%" td align="center" cellspacing="0" id="submenu">
  2. <tr>
  3. <td align=left>
  4.  
  5. <table width="100%" height="80px" border="0" cellspacing="0" cellpadding="0">
  6. <tr>
  7. <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>
  8. </font>
  9. </td></tr></table></td></tr></table>
  10. <script language="javascript" type="text/javascript">
  11. <!--
  12. if(self.location.href.match('http://herproom.5.forumer.com/index.php?act=Search&CODE=getactive')){
  13. actm = document.getElementById('activetomar');
  14. actm.innerHTML += "<table class='tableborder'>Active Topics Removed</table>"
  15. }
  16. else {
  17. document.write("<iframe name='activetopmarq' src='{ibf.script_url}act=Search&CODE=getactive' style='display:none;' onload='latemarqHarvest()'></iframe>");
  18. //-->
  19. function latemarqHarvest()
  20. {
  21. martab = window.frames["activetopmarq"].document.getElementsByTagName("table");
  22. for(var i = 0; i < martab.length; i++){
  23. if(martab[i].className == "tablebasic" && martab[i].parentNode.className == "tableborder"){
  24. tabdiv = martab[i].innerHTML
  25. goingNav(tabdiv)
  26. }
  27. }
  28. }
  29. function goingNav(tabdiv)
  30. {
  31. actm = document.getElementById('activetomar');
  32. actm.innerHTML += "<table class='tableborder'>" + tabdiv + "</table>";
  33. }
  34. }
  35. //-->
  36. </script>
Reputation Points: 11
Solved Threads: 6
Posting Whiz in Training
Inny is offline Offline
293 posts
since Oct 2005
Feb 22nd, 2007
0

Re: faster loading iframe or better way

BUMP! Faster way to load/display this? css perhaps?
Reputation Points: 11
Solved Threads: 6
Posting Whiz in Training
Inny is offline Offline
293 posts
since Oct 2005
Feb 28th, 2007
0

Re: faster loading iframe or better way

Bump! some help here please? Anyway to make this function faster? is there a faster way to do this? Its just too slow!
Reputation Points: 11
Solved Threads: 6
Posting Whiz in Training
Inny is offline Offline
293 posts
since Oct 2005
Mar 19th, 2007
0

Re: faster loading iframe or better way

Anyone Know a less time (loading) consuming way to do this?
Reputation Points: 11
Solved Threads: 6
Posting Whiz in Training
Inny is offline Offline
293 posts
since Oct 2005
Mar 20th, 2007
0

Re: faster loading iframe or better way

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.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Mar 21st, 2007
0

Re: faster loading iframe or better way

It dosent display the whole page, only links inside an iframe.
Reputation Points: 11
Solved Threads: 6
Posting Whiz in Training
Inny is offline Offline
293 posts
since Oct 2005
Mar 22nd, 2007
0

Re: faster loading iframe or better way

But the browser doesn't know that. It loads everything in the frame before it can render it.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Mar 22nd, 2007
0

Re: faster loading iframe or better way

oh could ajax be used to do faster???
Reputation Points: 11
Solved Threads: 6
Posting Whiz in Training
Inny is offline Offline
293 posts
since Oct 2005
Mar 23rd, 2007
0

Re: faster loading iframe or better way

Could I use css to display this data?
Reputation Points: 11
Solved Threads: 6
Posting Whiz in Training
Inny is offline Offline
293 posts
since Oct 2005
Mar 23rd, 2007
0

Re: faster loading iframe or better way

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...
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
rgtaylor is offline Offline
83 posts
since Mar 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Javascript needed for Mobileno
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: whats wrong with my code?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC