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

Re: ContextMenu Help

Expand Messages
  • php08691
    Hi Caridy, My cells with filenames will always be in a specific column and if necessary, I could create id s for these cells. Do you have an example of your
    Message 1 of 3 , Nov 28, 2007
    • 0 Attachment
      Hi Caridy,

      My cells with filenames will always be in a specific column and if
      necessary, I could create id's for these cells. Do you have an example
      of your solution I could take a look at? Thanks.

      --- In ydn-javascript@yahoogroups.com, Caridy PatiƱo Mayea
      <caridy@...> wrote:
      >
      > Hello Jalvich:
      >
      > You can set a listener to the table element, and catch the events
      (bubbling up), and
      > analyse the event's target, determining if it is a cell with a "file
      name", and produce the
      > context menu on the fly.
      >
      > An easy option is to use the bubbling extension. I already posted a
      solution to create a
      > single instance of a context menu:
      > http://www.bubbling-library.com/sandbox/misc/contextmenu.js
      >
      > And here is the code to display the context menu on right click:
      > YAHOO.CMS.Bubble.on('property', function (layer, args) {
      > YAHOO.CMS.Bubble.processingAction (layer, args, {
      > filenameClassName: function (layer, args) {
      > if (!args[1].decrepitate && args[1].target) {
      > YAHOO.example.SingletonContentMenu.display ( args[1].target );
      > }
      > }
      > });
      > });
      >
      > In this case, all the elements with classname "filenameClassName"
      must display the
      > context menu on right click over the element.
      >
      > Best Regards,
      > Caridy (caridy at gmail.com)
      > http://www.bubbling-library.com/
      >
      > --- In ydn-javascript@yahoogroups.com, "php08691" <jalvich@> wrote:
      > >
      > > Need some help with creating ContextMenus and the one sheep example
      > > isn't cutting it. I'd like to be able to right click on any of the
      > > cells in a specific column of a table (not a datatable) and have the
      > > menu options know which element was clicked on. In essence, the cells
      > > would have a file name in them and right clicking would produce a menu
      > > so that when an option was clicked on, the result knew what file name
      > > was being clicked.
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.