velsto
Posts: 13
|
| Posted: 02/26/2008, 5:00 AM |
|
Hi
I have created a TabView and 2 Tabs using V4 and it generated the following code for me in the HTML:
Quote ://mainpanelYahooTabbedView Start @3-6357AC8B
function mainpanelYahooTabbedView_start() {
var mainpanelYahooTabbedView = new YAHOO.widget.TabView();
var Panel2_tab = new YAHOO.widget.Tab({
label: "Panel2",
active: true,
contentEl: document.getElementById("mainpanelPanel2")
});
mainpanelYahooTabbedView.addTab(Panel2_tab);
var Panel3_tab = new YAHOO.widget.Tab({
label: "Panel3",
contentEl: document.getElementById("mainpanelPanel3")
});
mainpanelYahooTabbedView.addTab(Panel3_tab);
var Panel4_tab = new YAHOO.widget.Tab({
label: "Panel4",
contentEl: document.getElementById("mainpanelPanel4")
});
mainpanelYahooTabbedView.addTab(Panel4_tab);
YAHOO.util.Event.onContentReady("mainpanel", function() {
mainpanelYahooTabbedView.appendTo(this);
});
}
//End mainpanelYahooTabbedView Start
My problem is how to manipulate TabView and its elements in Javascript functions. The TabView is created in the "mainpanelYahooTabbedView" variable, but I cannot access it outside of the generated function. And to allocate its value to a global variable, which will be acccessable in other functions, I will have to modify the generated function, causing it to NOT be overwritten when new code is generated?
Is there any other way I can achieve this?
Thanks
|
 |
 |
|