jQuery: ajaxForm beforeSerialize dying in IE6
Perhaps I'm doing something stupid here, but why would IE6 die here? All other开发者_开发技巧 browsers have no issue with this code, but IE6 is choking:
jQuery( function( $ ) {
jQuery("[name='myform']").ajaxForm({
target: '#form_quotes_highlights_part',
beforeSerialize: function(form, options) {
if (somefunc()) {
if ( $tabChanged ) {
diff(form[0]);
jQuery('form[name=myform] input[type=submit]').attr('disabled', 'disabled').attr("value", "Wait..");
return true;
}
else {
return false;
}
}
return false;
},
/* more code */
It happens to die directly after .attr call, not sure why. Only on IE6. Anything obvious missing here? IE6 is giving me the infamous: Error: Object expected.
Try using $().val()
rather than attr('value')
:
jQuery('form[name=myform] input[type=submit]').attr('disabled', 'disabled').val("Wait..");
精彩评论