access 'array variables'
Posted: Wed May 09, 2007 10:22 am
I don't know what this is called.. But here is what I'm doing
As you can see, It's looping through 4 times and assigning oTextNode each time...
How do I access each instance of oTextNode? I feel like I should be able to do something like oTextNode[1] for example.... OR is there a way to have a dynamic variable.... like instead of oTextNode have it "oTextNode + i"
Thanks for your help!
Code: Select all
var i=0;
for (i=0; i<4; i++)
{
var oTextNode = new YAHOO.widget.TextNode(myobj.Roots[i], root, false);
}How do I access each instance of oTextNode? I feel like I should be able to do something like oTextNode[1] for example.... OR is there a way to have a dynamic variable.... like instead of oTextNode have it "oTextNode + i"
Thanks for your help!