Jody
30 Nov 2006, 2:48 PM
Jack, great work... hopefully this isn't a stupid question (kind of new to the yui framework and your extension; love it though.
I have a simple TabPanel and the code for it works fine but I need to initiate it's instantiation via script... how would I call the init function manually?
Here is the code:
var newtabs = {
init : function(){
var tabs = new YAHOO.ext.TabPanel('mytabs');
tabs.addTab('tab1', "tab1");
tabs.addTab('tab2', "tab1");
tabs.addTab('tab3', "tab1");
tabs.activate('tab1');
}
}
to load onDocumentReady you'd use:
YAHOO.ext.EventManager.onDocumentReady(newtabs.init, newtabs, true);
But I need to fire the init function later...
(I've left out the HTML, but again, I don't have a problem getting the tabs to work onDocumentReady).
Any help would be greatly appreciated.
Thanks,
I have a simple TabPanel and the code for it works fine but I need to initiate it's instantiation via script... how would I call the init function manually?
Here is the code:
var newtabs = {
init : function(){
var tabs = new YAHOO.ext.TabPanel('mytabs');
tabs.addTab('tab1', "tab1");
tabs.addTab('tab2', "tab1");
tabs.addTab('tab3', "tab1");
tabs.activate('tab1');
}
}
to load onDocumentReady you'd use:
YAHOO.ext.EventManager.onDocumentReady(newtabs.init, newtabs, true);
But I need to fire the init function later...
(I've left out the HTML, but again, I don't have a problem getting the tabs to work onDocumentReady).
Any help would be greatly appreciated.
Thanks,