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

Editable Tree ... and Fundamental Event Question

Expand Messages
  • Louis Arquie
    I am trying to get the tree labels to be editable on double-click. In the process I discovered there is one thing (at least!) I am confused with: 1. I am
    Message 1 of 1 , Jul 5 4:57 PM
    • 0 Attachment
      I am trying to get the tree labels to be editable on double-click.

      In the process I discovered there is one thing (at least!) I am
      confused with:

      1. I am adding a double-click listener with:
      YAHOO.util.Event.addListener(this.labelElId, 'dblclick',
      editable.dbl_click, editable, true);
      (I am using Dav Glass editable.js)

      2. When a tree branch is expanded, then collapsed and the innerHTML
      for that tree branch gets wiped out and recreated, does that wipe
      out the event listeners? Do I have to keep reattaching the event
      listeners each time the branch is expanded? And, if not, what is the
      magic that keeps the event listeners connected to the node even
      though the innerHTML is wiped out?
      Additional question: how do I figure out which events an element is
      listening to with Firebug (or any other tool)?

      Thanks in advance!
      Louis
    Your message has been successfully submitted and would be delivered to recipients shortly.