YAHOO.widget.tab.dataSrc issue
Hello, Dear YAHOO YAP TEAM
I want to use YAHOO.widget.tabview to generate my game's tab, because it is very beautiful. but i meet a problem when i wanted to request data dynamically from my server, in this case ,the tabview is not work. Here is my code:
<div id="container"><h2 class="first">Browser News</h2></div>
<script type="text/javascript">
(function() {
var tabView = new YAHOO.widget.TabView('container');
tabView.addTab( new YAHOO.widget.Tab({
label: 'Play',
dataSrc: './message.php?parameter=play',
cacheData: true,
active: true
}));
tabView.addTab( new YAHOO.widget.Tab({
label: 'Invite',
dataSrc: './message.php?parameter=invite',
cacheData: true
}));
tabView.addTab( new YAHOO.widget.Tab({
label: 'Pay',
dataSrc: './message.php?parameter=pay',
cacheData: true
}));
})();
</script>
Meanwhile, I try to use contentEl to get the tabview's content, it also did not work unless use YAHOO.widget.tab.content to show the tabview's content..
The other problem, On the YAP, it will occur a error too when i use tabview.appendTo("container"), so i have to do it like this "var tabView = new YAHOO.widget.TabView('container');"
Finally, I really want to use the dynamical request function, hope you can give me any suggestion about this problem? thanks.
by
0 Replies