Javascript Assoctiative Arrays

Posted by John Hartsock on Stack Overflow See other posts from Stack Overflow or by John Hartsock
Published on 2010-04-23T00:41:21Z Indexed on 2010/04/23 0:43 UTC
Read the original article Hit count: 268

Hello all,
It seems to me that this should work but I cant see what exactly is the problem.

The error Im receiving is "DDROA is not defined"

Could anyone help enlighten me.

var DDROA = {
    AllowedRoutes : {
        AR0 : {text : 'SomeText', value : 'SomeValue'},
        AR1 : {text : 'SomeText2', value : 'SomeValue2'}
    },
    RouteContext : {
        RC0 : {text : 'None', value : '0',
            AllowedRoutes : new Array(
                DDROA.AllowedRoutes.AR0  // An error occurs here
            )
        }
     }
}

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about associative-array