I have problem with select list in IE (all version). I got two field with directions who depends of City1 and City2 fields. When I pick the City from City1 in direction field should display only 4 directions. Similarly, in the City2 field. Everything working fine in Firefox, Chrom, Opera, but no in IE – I see the whole list of directions.
in my opinion – something is wrong with this code, but i don’t know what:
if (parseInt($("#finish_day").val()) < 4) {
$('#return_car').children('#return_car option[value=' + $('#get_car').val() + ']').attr('selected', 'selected').siblings().attr('disabled', true);
if ($('#return_car').val()) $('#return_car').change();
} else {
$('#get_car > option, #return_car > option').prop('disabled', false);
});
}
The working code is here: http://jsfiddle.net/utXMD/
Thanks in advice for any help.
Delete the commas after the last values in $.viewMap_get and $.viewMap_return objects:
IE7 and IE8 have issues with JS objects values which ends with a trailing ‘,’.
UPDATE:
Try the following code: