PDA

View Full Version : Timing of function call is to soon I think.



Elijah
7 Dec 2009, 9:04 PM
I have the code from the example Tabs display creating 4 tabs. after the call for win.show(); I have a call called 'taskInit();' when it gets to this line I get a false javascript error saying something not important in one of the ext files which I know is not broken. If i comment out the call to the method and run the taskInit() from the console in firefox the tab renders my display.

So, I believe that its a matter of the call being executed faster than the DOM is generating the view so it does not see something when it is called by code.

How can I call a method and ensure that it is there or the target is there where the item is to be rendered?