I have a slight problem with a Tab Control that I've developed for an application. Once sent to the browser it runs via JavaScript. The JavaScript is dynamically generated by my .NET code. Everything works fine.
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 "initializi ng" when the page is loaded (sets some <div>'s invisible so to show only the one selected). Without this "initializi ng" all of the <div>'s are displayed.
I've been using the following JavaScript to initialize my Tab Control:
[code=javascript]
if(window.attac hEvent)
{
window.attachEv ent("onload" ,"InitializeTab Control");
}
else{
window.addEvent Listener("load" ,"InitializeTab Control", false);
}
[/code]
The problem with this is that the JavaScript call too fast...the tab that should be set to Visible is set before the Ajax animation that fades the page into view happens.
I've attempted to modify the JavaScript responsible for initializing my Tab Control to be:
[code=javascript]
if(document.att achEvent)
{
document.attach Event("onload" ,"InitializeTab Control");
}
else{
document.addEve ntListener("loa d","InitializeT abControl", false);
}
[/code]
However, this does not appear to do anything.
Does anyone know how to set the JavaScript for the Tab Control to happen about the same time as the animation?
Is the document.addEve ntListen 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
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 "initializi ng" when the page is loaded (sets some <div>'s invisible so to show only the one selected). Without this "initializi ng" all of the <div>'s are displayed.
I've been using the following JavaScript to initialize my Tab Control:
[code=javascript]
if(window.attac hEvent)
{
window.attachEv ent("onload" ,"InitializeTab Control");
}
else{
window.addEvent Listener("load" ,"InitializeTab Control", false);
}
[/code]
The problem with this is that the JavaScript call too fast...the tab that should be set to Visible is set before the Ajax animation that fades the page into view happens.
I've attempted to modify the JavaScript responsible for initializing my Tab Control to be:
[code=javascript]
if(document.att achEvent)
{
document.attach Event("onload" ,"InitializeTab Control");
}
else{
document.addEve ntListener("loa d","InitializeT abControl", false);
}
[/code]
However, this does not appear to do anything.
Does anyone know how to set the JavaScript for the Tab Control to happen about the same time as the animation?
Is the document.addEve ntListen 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
Comment