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.
Printable View
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.
something along these lines should work
hth :)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");
};