Okay, does IE execute window.onload event before it loads? Cause in firefox my script is working fine but in IE it does not. I think I remember reading that IE's onload event fires when it's loading, not after (like firefox).
Details are appreciated.
Thanks for reading my post.
IE 6 & 7 window.onload
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
-
nickvd
- DevNet Resident
- Posts: 1027
- Joined: Thu Mar 10, 2005 5:27 pm
- Location: Southern Ontario
- Contact:
If I recall correctly, the onload event fires after ALL ELEMENTS on the page have loaded, including external scripts, images, etc... There is a different event handler out on the net that will let you attach your function to it, and it will get fired after the DOM is ready to manipulate.
I can't remember where I saw the code, but I'm using jQuery right now, and it's as simple as:
I can't remember where I saw the code, but I'm using jQuery right now, and it's as simple as:
Code: Select all
$(document).ready(function(){/*take over the world here*/});- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US