Friday, 15 March 2013

IE7 add element and value to javascript array -



IE7 add element and value to javascript array -

i declaring array such

var positions = [];

or

var positions = new array();

either way works

later in script value added such

positions[0].top = 0;

everything fine in every browser except ie7 gets error

error: unable set value of property 'top': object null or undefined

is there way should populate arra in ie7?

you want javascript function push(). should doing across board.

var positions = ["something", "somethign else"]; positions.push("something new");

.top property of dom elements believe, not appropriate array.

javascript arrays internet-explorer-7

No comments:

Post a Comment