开发者

jQuery: ajaxForm beforeSerialize dying in IE6

开发者 https://www.devze.com 2023-01-21 17:53 出处:网络
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:

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..");
0

精彩评论

暂无评论...
验证码 换一张
取 消