--Normal namespace object
MYNS.CarTypeCd = function() {}
--Normal Array
var CarTypeCd = new Array();
CarTypeCd [0] = new Array("Ford", "Pinto");
CarTypeCd [1] = new Array("GM", "Suburban");
doing
MYNS.CarTypeCd = new Array();
gets a CarTypeCd is not defined error.
Thank you,
Mica
Did you mean
MYNS.CarTypeCd = {};
?
> --Normal Array
> var CarTypeCd = new Array();
> CarTypeCd [0] = new Array("Ford", "Pinto");
> CarTypeCd [1] = new Array("GM", "Suburban");
>
> doing
> MYNS.CarTypeCd = new Array();
> gets a CarTypeCd is not defined error.
No, it doesn't?
How about this:
var MYNS = {
CarTypeId: []
};
MYNS.CarTypeId[0] = ["Ford", "Pinto"];
MYNS.CarTypeId[1] = ["GM", "Suburban"];
or even simpler:
var MYNS = {
CarTypeId: [ ["Ford", "Pinto"], ["GM", "Suburban"] ]
};
--
stefan
Stefan,
Thank you, that seems to work fine. I googled and looked in several books
and did not see an example of this.
Mica