A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Loading different XMLs into TextArea using buttons.

Hybrid View

  1. #1
    Junior Member
    Join Date
    May 2007
    Posts
    17

    Loading different XMLs into TextArea using buttons.

    I have one textarea and I want to change the content of that textarea by clicking buttons. So what would be a function for a button to load a different XML into the textarea? Thanks.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    something along these lines should work
    Code:
    function loadXML(xfile){
    _xml = new XML();
    _xml.ignoreWhite = true;
    _xml.load(xfile);
    
    _xml.onLoad = function(){
    // your parse code
    // when parsed
    // display in textarea
    }; // end onLoad
    }; // end function loadXML
    
    btn1.onRelease = function(){
    loadXML("first.xml");
    };
    
    btn2.onRelease = function(){
    loadXML("second.xml");
    };
    hth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center