Hi,

i have a problem. I would like to retrive xml data from an external file. An than i would collect data from that xml to be compared with some id buttons.

ex. IF (xml output atributte) == (id of button), than dissplay button red, else dissplay blue.

I have no problems till here. This is the array and its conntent.

var dataValues = new Array();
dataValues[0] = "100";
dataValues[1] = "131";

if i do it manualy, like you see above, it all works fine. The buttons respond to it just fine and have the correct color. But if i try to implement it to a load from the xml file all the buttons stay blue.

I dont know how to set an array in this:


function loadXML(loaded) {

if (loaded) {
dataValues[42] = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;

// EVEN IF I TRY dataValues[1] = "200" or something. It just doesent work in that function
}

}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("buttons.xml");

Please help. Ive been trying all day and no success.