[jQuery] error with $(this).val(value) in IE 6.x
for some empty select elements inside form and table I've done something like that: $.each( $('#form_table .mt_type'), function() { elemId = $(this).attr('id'); //alert(elemId); $(this).html('\ option value=0-- wybierz --/option\ option value=1val1/option\ option value=2val2/option\ option value=3val3/option\ option value=4val4/option\ '); // both of following give me error in IE6, FF and Opera report no problem. $(this).val(0); $('#'+elemId).val(0); } ); I set the val to 0 coz in FF it shows 5th ('4') option as selected.
[jQuery] error with $(this).val(value) in IE 6.x
for some empty select elements inside form and table I've done something like that: $.each( $('#form_table .mt_type'), function() { elemId = $(this).attr('id'); //alert(elemId); $(this).html('\ option value=0-- wybierz --/option\ option value=1val1/option\ option value=2val2/option\ option value=3val3/option\ option value=4val4/option\ '); // both of following give me error in IE6, FF and Opera report no problem. $(this).val(0); $('#'+elemId).val(0); } ); I set the val to 0 coz in FF it shows 5th ('4') option as selected.