Load Javascript Last...

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

boomers

Established Member
Impact
4
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 :)
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Code:
window.onload = function () {
  // The JS here will run after the page loaded
}
Is that what you're asking for?
 
0
Close
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.
 
0
Close
If you want all of the JS in that file to load after the page is done loading, I'd need to see it to be able to make that work.
 
0
Close
Its just an include file - the source is just something that writes out text... literally, I thought a few weeks ago I saw that something could be put after the 'language=javascript' part. Just cant find out what it was :(
 
0
Close
You could put the <script> stuff at the end of the file..
 
0
Close
just drop it after all the html, especially if you need to manipulate form values.
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back