Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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

Posts: 229
Trades: 1
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
__________________

Please login or register to view this content. Registration is FREE
- Add your site to the directory with attitude!

Please login or register to view this content. Registration is FREE
- Football News Portal, updated hourly!
boomers is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-26-2006, 06:27 PM Re: Load Javascript Last...
mad_willsy's Avatar
Super Spam Talker

Latest Blog Post:
PC World Placement
Posts: 801
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
Trades: 0
Not 100% sure, but don't you just call the script using body onload?
__________________
Wont :P

Please login or register to view this content. Registration is FREE
mad_willsy is offline
Reply With Quote
View Public Profile Visit mad_willsy's homepage!
 
Old 11-26-2006, 06:56 PM Re: Load Javascript Last...
boomers's Avatar
Extreme Talker

Posts: 229
Trades: 1
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.
__________________

Please login or register to view this content. Registration is FREE
- Add your site to the directory with attitude!

Please login or register to view this content. Registration is FREE
- Football News Portal, updated hourly!
boomers is offline
Reply With Quote
View Public Profile
 
Old 11-26-2006, 10:55 PM Re: Load Javascript Last...
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.19937 seconds with 12 queries