Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Faster Pages? 2

Status
Not open for further replies.

shmmeee

Programmer
Apr 17, 2001
104
GB
I've got a news feed on my home page, because it's got to connect to the news feed site the table with the feed in takes ages to load and consequently the rest of the page has to wait. Is there any way to get the browser to show the rest of the page first so there's something there while waiting for the news to load?

 
It's a huge piece of JavaScript from I really dont want to post it here, it can probably be shortened but I haven't got the time just yet, but if you need me to post it I will.
 
well what I need to know if it's possible to have it load from a function, if you can do this, put onLoad=&quot;function()&quot; in your <body> tag -Greg :-Q
 
What mackey333 said is correct. Convert the javascript to an external .js file. Make sure to put at the top (if it's not already there) function functionname() and start and end the function with the { and } tags. Then load the external javascript file into the page with the <script type=&quot;text/javascript&quot; src=&quot;yourURL/filename.js&quot;></script> command between your <head> tags. Then use the onload=&quot;functionname()&quot; command in your <body> tag.
I hope this helps!
Brett Please visit my websites!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top