--- uc_attribute_stock_filter.js 2009-04-13 20:35:52.000000000 -0400 +++ uc_attribute_stock_filter.js.patched 2009-04-13 20:33:27.000000000 -0400 @@ -17,6 +17,7 @@ Drupal.behaviors.ucAttributeStockFilter function onSelectChange() { var parentForm = 'form#'+ $(this).parents('form').get(0).id; // Grab id of parent form tag. + var parentNode = parentForm.substr(parentForm.lastIndexOf('-') + 1); var parentId = '#'+ $(this).parent().get(0).id; // Grab id of parent of active option var selected = $(parentForm +" "+ parentId +" option:selected").val(); // Grab value of selected option // alert(parentId); @@ -65,8 +66,8 @@ function onSelectChange() { .not($(parentForm +" "+ parentId +" option")) // .. excluding the active select box .each(function() { if (this.value) { - if (typeof uc_asf_AvailableOptions[selected] != 'undefined') { // Avoid triggering a JS error - if (uc_asf_AvailableOptions[selected].indexOf(this.value) == -1) { // If the option value isn't in the array ... + if (typeof uc_asf_AvailableOptions[parentNode][selected] != 'undefined') { // Avoid triggering a JS error + if (uc_asf_AvailableOptions[parentNode][selected].indexOf(this.value) == -1) { // If the option value isn't in the array ... if ($.browser.msie) { $(this).remove(); // IE doesn't allow hide or disable, so remove it }