#508 ✓incomplete
Mark Garber

Arrays in IE 8 vs Firefox

Reported by Mark Garber | December 30th, 2008 @ 02:06 PM

I've noted a problem in arrays in IE8 in that the array length is different between the two. I think this may be a bug in IE but I'm passing it along.

Example: var MyArray=Array(); var OneItem=[{key:"MyKey",value:"MyValue"}] MyArray.push(OneItem);

Array.each will work OK in FireFox but not in IE. I also note that MyArray.length==3 in IE

I'm not sure if this is a bug in IE8 but this is a little problematic when using Array.each(). I note that IE8 debugger will show the following under the watch window.

MyArray Methods;0;length;

Under IE "each" will iterate through length and cause an exception.

e.g. MyArray.each(function(s){...do something with s.mykey...})

I can put this in a try{}catch{} but it is not very satisfying.

Thanks Mark Garber

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Pages