2 Replies Latest reply on May 24, 2007 6:40 PM by The ScareCrow

    How to access the parent container ??

    The ScareCrow Level 1
      I have the follwoing code

      newButton = new Button();
      newButton.label = "Submit";
      newButton.id = "btn_" + arrPerformance.getItemAt(x).fld_question_number;
      newButton.addEventListener("click",saveAnswer);

      newRichTextEditor = new RichTextEditor();
      newRichTextEditor.id = "answer_" + arrPerformance.getItemAt(x).fld_question_number;
      newVBox.addChild(newRichTextEditor);
      newRichTextEditor.toolbar.addChild(newButton);

      As you can see I have added a button to the toolbar of the rich text area control.

      The event listener "saveAnswer" will save the contents of the rich text control to the db.

      But I can't figure out how to reference the rich text container.
      If I use event.target.parent this only gives me the toolbar !!

      Also note that the form has multiple of these, that's why it's in action script.
      So I need to be able to access the rich text area "textarea" and the id, so I can pass these to the cfc.

      Ken