[thelist] ie JS array limitations?

Brian Cummiskey brian at hondaswap.com
Fri Oct 31 00:31:57 CDT 2008

Ken Snyder wrote:
> I do think you're barking up the wrong tree.  

Well, that's both encouraging and painful at the same time.  heh

> Could you explain how things "break" in IE7 and IE8?

These arrays populate the displays on a product's color and sizing 
options, as well as updates the price, the display image, and sku into a 
hidden field.

Color is chosen first (and size is disabled until color is chosen), and 
an onchange() finds the color instances through a double for loop (for 
both array dimensions) and populates the size drop down with options and 
values (which works).

Then, when a size is chosen, the price, sku, and image display are 
changed with the other elements in the array in the same process.

This code works fine on 99.9% of the products.
ie breaks this particular one, but there's no JS errors reported, and 
firefox and safari still function fine.

In ie, when the size is changed, the selected option box goes blank, as 
if it generated <option value=""></option> instead of <option value="28 
   30">28W x 30L</option> like it should.
Additionally, the sku, the image, nor the price get updated, much like 
when a JS error occurs (stops execution more or less).

but, it's only in ie!   If my scripting were wrong, it wouldn't work in 
firefox or safari at all either.

And it's all the same code, just different sizes/colors (data) and ie 
displays most all other products fine.

More information about the thelist mailing list