| | |
faster loading iframe or better way
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
hereis current code
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<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>
Always carry a flagon of whiskey in case of snakebite and furthermore always carry a small snake.
W. C. Fields
W. C. Fields
•
•
Join Date: Mar 2007
Posts: 83
Reputation:
Solved Threads: 2
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...
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...
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javascript needed for Mobileno
- Next Thread: whats wrong with my code?
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxexample ajaxjspservlets array blackjack browser captcha captchaformproblem cart child class close codes date debugger dependent developer disablefirebug dom editor element embed engine enter events explorer ext file firefox flash focus form forms frameworks game getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe java javascript javascripthelp2020 javascripts jquery jsf jsp jump libcurl listbox maps marquee masterpage math media menu object onerror onmouseoutdivproblem onmouseover onreadystatechange parent passing paypal pdf php position post programming prototype rated redirect safari scale scriptlets scroll search security size software sources star starrating stars stretch synchronous toggle tweet unicode variables web webservice window \n






