2011-03-10 56 views
0

我有這個MooTools的1.1腳本形式submited後正在更新DIV,更新DIV發送MooTools的1.1至1.2 Mootools的

試圖將它轉換爲MooTools的1.2.4但日誌不工作,我我沒有得到任何錯誤,要麼

MooTools的1.1

 $('myform').addEvent('submit', function(e) { 

      new Event(e).stop(); 
      var log = $('log_res').empty().addClass('ajax-loading'); 
      this.send({ 
       update: log, 
       onComplete: function() { 
        log.removeClass('ajax-loading'); 

       } 
      }); 
     }); 

mootols 1.2

 $('myform').addEvent('submit', function(e) { 

      new Event(e).stop(); 
      var log = $('log_res').empty().addClass('ajax-loading'); 
      this.set('send',{ 
       update: log, 
       onComplete: function() { 
        log.removeClass('ajax-loading'); 

       } 
      }).send(); 
     }); 

回答

1

試試這個:

 $('myform').addEvent('submit', function(e) { 

     e.stop(); 
     var log = $('log_res').empty().addClass('ajax-loading'); 
     this.set('send',{ 
      url: this.get("action"), 
      data: this, 
      update: log, 
      onComplete: function() { 
       log.removeClass('ajax-loading'); 

      } 
     }).send(); 
    }); 
+0

謝謝你,這個工作對於武1.3 – Benn 2011-03-11 18:43:27