0 Replies Latest reply on Mar 30, 2007 9:19 AM by kwyjibo12ret

    storing comment in a text field

    kwyjibo12ret
      Hello everyone. Hope you are all well.

      Have a bit or of a problem.

      I have imported and XML file and using the code below i am able to store comments against a particular node.

      //istener object for tree
      var lo:Object = new Object();//a custom object called "lo" is created.
      lo.change = function(evtObj:Object):Void{

      var itm:Object = mytree.getSelectedItem();
      if(itm.savedComment != undefined)
      newcomment.text = itm.savedComment;

      else
      newcomment.text = "";
      }
      mytree.addEventListener("change",lo);//everytime the tree component generates a change event
      //from the user selecting a different node the listener code runs.


      //listener object for submit button
      var lo2:Object = new Object();
      lo2.click = function(evtObj:Object):Void{
      var itm:Object = mytree.getSelectedItem();
      itm.savedComment = newcomment.text;
      }
      addCommentbtn.addEventListener("click",lo2);

      All i need now is that whenever the user clicks on a button ("viewComment") ALL the comments already submitted are presented in a dynamic text field.



      ANy help is much appreciated. Thanks.