3 Replies Latest reply on Mar 5, 2009 6:32 AM by kglad

    reset text fields populated with XML to blank

    chieffan Level 1
      I have data loading into one of X number of colums when a button is pressed. So button 1 is pressed and text for button one loads into say 4 columns. Then when button 2 is pressed, it may load into 2 columns.

      What is happening in this example is the data for button 1's remaining two columns is still showing. Button 2 only has XMl for the 2 columns.

      I tried resetting the value of the text as indicated below but it does not remove the colums which are not needed.

      _root["but"+b].onRelease = function() {
      var path = "buttongroup/but[@id='"+this._name+"']/column";
      var myCols:Array = XPathAPI.selectNodeList(myXML.firstChild, path);
      for (var j = 0; j<myCols.length; j++) {
      _root["c"+j+"_txt"].htmlText = ""
      _root["c"+j+"_txt"].htmlText = myCols[j].firstChild.nodeValue;
      }
      };