Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Dispatching to tabs that are created from markup, not javascript. Po   Message List  
Reply | Forward Message #41991 of 52114 |
Hello,

Can you use the YAHOO.plugin.Dispatcher to delegate to tabs that
already exist in markup? The examples that I see all involve creating
tabs in javascript, like so:

YAHOO.plugin.Dispatcher.delegate ( new YAHOO.widget.Tab({
label: 'Team Members',
datasrc: "/link/to/datasrc",
active: true
}), topLevelTabs)

But what if you already had a tab, as part of tabview created from
markup by passing the id to the tabview widget:

var tabView = new YAHOO.widget.TabView('demo');
teamTab = tabView.getTab(0);

Could you then use the Dispatcher to delegate a datasrc to the
existing tab, teamTab? If so, what would be the syntax?

The reason I ask is because I'm creating some tabs in markup rather
than js because the markup needs to be a little different than what's
generated by default. This is in order to have a static area in each
tab that doesn't change when the datasrc is reloaded. Since you can't
have both content and a datasrc at the same time, I want to add this
extra div. But also use the dispatcher.

<ul class ="yui-nav">
// list items here
</ul>
<div>tab static content here</div>
<div class="yui-content">the panel that gets refreshed by tab
content</div>

Thanks,
Sarah






Fri Dec 5, 2008 12:52 am

sarahg.gray
Offline Offline
Send Email Send Email

Forward
Message #41991 of 52114 |
Expand Messages Author Sort by Date

Hello, Can you use the YAHOO.plugin.Dispatcher to delegate to tabs that already exist in markup? The examples that I see all involve creating tabs in...
sarahg.gray
Offline Send Email
Dec 5, 2008
12:52 am

Hello Sarah, The ANSWER for your QUESTION is YES. If you pass the second argument, like this: YAHOO.plugin.Dispatcher.delegate ( new YAHOO.widget.Tab({ label:...
Caridy Patino
caridyp
Offline Send Email
Dec 7, 2008
1:11 am

Hello, I am using the tabview build from markup and want to load the content each time the tab is active. Am using the dispatcher also but am clueless how to ...
RahulJain
rahuljain273
Offline Send Email
Dec 18, 2008
10:46 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help