I want Montana data to appear when I click the state of Montana (and so on throughout the 50 states). Montana is the instance name of my simple button on the state of Montana.

Something's not quite right about this line of code:

if (pEvent.target == myXML.statename[i]) { ...then do something ...}

The code works fine if I say
if (pEvent.target == Montana)

Do I have to convert the myXML node value to text or something?