Reply
Load Javascript Last...
Old 11-26-2006, 05:23 PM Load Javascript Last...
boomers's Avatar
Extreme Talker

Posts: 213
Hello

Im 99% sure that a few weeks ago I saw an easy way to make your javascript load after the rest of the page has loaded... however I didnt bookmark the page.

If anyone knows how to do this then please let me know
__________________
NewsToolkit - Add the latest news headlines to your site, automatically kept updated... a FREE service!
boomers is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 11-26-2006, 05:27 PM Re: Load Javascript Last...
mad_willsy's Avatar
Super Spam Talker

Posts: 774
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
Not 100% sure, but don't you just call the script using body onload?
__________________
Wont :P
SoldierExteme.com - Free MMORPG - sign-up today!
Backthebulls.com - Free online games
mad_willsy is offline
Reply With Quote
View Public Profile Visit mad_willsy's homepage!
 
Old 11-26-2006, 05:56 PM Re: Load Javascript Last...
boomers's Avatar
Extreme Talker

Posts: 213
I should have been clearer but my knowledge of JS is very poor, however my HTML is

Code:
<script language='javascript' src='URL'></script>
So the option to use onload isnt there.
__________________
NewsToolkit - Add the latest news headlines to your site, automatically kept updated... a FREE service!
boomers is offline
Reply With Quote
View Public Profile
 
Old 11-26-2006, 09:55 PM Re: Load Javascript Last...
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
You don't call a script onload. You call a function onload.

For example:

function somecode() {
...
}
<body onload="somecode()">

The function can be contained in its own .JS file (and should.) But it has to be called onload.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Load Javascript Last...
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12995 seconds with 13 queries