I've recently been adding "animations" to my web application using Ajax.
The animation "Fades" the page in once it is finished loading (without this fading effect the page load is very choppy).
My Tab Control requires some "initializing" when the page is loaded (sets some <div>'s invisible so to show only the one selected). Without this "initializing" all of the <div>'s are displayed.
I've been using the following JavaScript to initialize my Tab Control:
Expand|Select|Wrap|Line Numbers
- if(window.attachEvent)
- {
- window.attachEvent("onload" ,"InitializeTabControl");
- }
- else{
- window.addEventListener("load","InitializeTabControl", false);
- }
I've attempted to modify the JavaScript responsible for initializing my Tab Control to be:
Expand|Select|Wrap|Line Numbers
- if(document.attachEvent)
- {
- document.attachEvent("onload" ,"InitializeTabControl");
- }
- else{
- document.addEventListener("load","InitializeTabControl", false);
- }
Does anyone know how to set the JavaScript for the Tab Control to happen about the same time as the animation?
Is the document.addEventListen supposed to work the way I'm trying to use it?
(I'm probably not using it right...)
Thanks a lot for your help!
-Frinny