5302Re: Menu in document flow
- Sep 29, 2006Thank you very much, now I understand the difference between the
element id used in the constructor and the one in the render method.
That was where I made the error. All works now, thank you!
> "rootstones" -
> If you are building your menu bar completely from script, the id
that you pass to the MenuBar constructor is the id of the element that
you want to create. When you call the "render" method, you'll pass in
the and id or element reference for a node that the menu bar should be
appended into. The problem with your code appears to be that you are
passing the same id to both the MenuBar constructor and the call to
"render." Lastly, MenuBar is positioned statically by default, so
there is no need for you to pass that configuration into the
constructor. Your code should look something like this:
> var oMenuBar = new YAHOO.widget.MenuBar( [ the element id for your
menu's root node ] );
> oMenuBar.render( [ the id of the element your menu should be
rendered into ] )
> I hope that helps you.
> You might also want to take a look at the examples that use MenuBar:
> - Todd
- << Previous post in topic