Loading ...
Sorry, an error occurred while loading the content.
 

Re: YUI Menuitem

Expand Messages
  • sphilip999
    Thanks a lot. I am going to try this.
    Message 1 of 3 , Jul 2 11:30 AM
      Thanks a lot. I am going to try this.

      --- In ydn-javascript@yahoogroups.com, "wally.ritchie"
      <wally.ritchie@...> wrote:
      >
      >
      > --- In ydn-javascript@yahoogroups.com, "sphilip999" <sphilip999@>
      > wrote:
      > >
      > > Can anybody please help ?
      > > How will I upload a menuitem dynamically from the database when the
      > > page is loaded.Is there any links or tutorial to follow?
      > > Thanks
      > >
      > See the Connection menu examples for making AJAX requests to the server.
      > See the Menu examples on building menus from Javascript for how to add
      > menu-items to an existing menu or create a new menu in the existing
      > document.
      >
      > A lot depends on the over-all flow of your application. One approach is
      > to request JSON objects from the server and then process these objects
      > to manipulate the DOM and/or YUI objects on your page. For example, in
      > response to some event you could use a get request to fetch an array of
      > objects from your server that looks something like this:
      >
      > [{ "cmd" : "menuItem", "div" : "menu1", "nav" : true, "content" : {
      > "text": "Home", "url" : "?p=home"} }, { "cmd" : "menuItem", "div" :
      > "menu1", "nav" : true, "content" : { "text": "Products", "url" :
      > "?p=products"} }]
      >
      > You can then have a generic handler in your Javascript for this kind of
      > response which parses the JSON and then handles the items in the array.
      > The above example (from an actual working framework) contains two
      > menuItem command objects that each adds a menu item to the existing menu
      > object associated with div "menu1". Because you can nest objects
      > containing other (non-function) objects you can often pass them through
      > unchanged.
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.