I have javascript in my <head> tag that needs some <div> tags in the body section to be loaded. How do I only execute the javascript if the window is done loading? (The javascript is in an external sheet if that matters.) Thanks! ~imzoeb
If I understood you correctly you have to do it by window.onload = function(){ // your code } Code (markup): If not - explain in details.
My script works fine in IE but when I try to run it in FireFox the rollOvers don't work. I checked FireFox's error console and it states that my roll over functions have not been defined when I rollOver the button. I don't know why this is happening but I assumed that the window needs to be completely loaded before it reads the Javascript. I'm not sure if this is the problem because I've been using IE to test my script all this time and now I am trying to make it cross-browser. Any ideas? Thanks.