hi there,

i know this is generic JS und it is only occuring in IE7, but i hope you can
help me though...

i have an array/list of objects like

[
    {
        name : 'blah blah',
        mp3 : 'http://server.tld/song.mp3',
        ....
    },
    .....
]

when i do a for-in loop over such an object, i get its keys and values as it
should be...

but, the next line, when i try to access the objects' properties 'directly'
like

    oTrack.mp3    or     oTrack['mp3']

all IE(7) outputs is a unsatisfying 'undefined'... (please, see the code
below for further details)


any ideas anyone, please?

YT
BB

<code>

for ( iTrack in aPlaylist ) {

var oTrack = aPlaylist[iTrack];

for ( mData in oTrack ) {

 document.write('' + iTrack + ', ' + mData + ', ' + oTrack[mData] + '<br />');
// everything seems fine, all keys, all values

}

document.write('' + iTrack + ', ' + oTrack.mp3 + '<br />');    // nothing is
fine, outputs 'undefined' for any property
document.write('' + iTrack + ', ' + oTrack['mp3'] + '<br />'); // ...

}
</code>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to