tags:

views:

78

answers:

0

Hi all, i'm using Mootools 1.2. Ihave 15 Forms with same name only change in their id's like form1, form2, form3, ... ,form15 same with their elements. i need to submit all forms by ajax. For that purpos i make a function and call them on each functions onClick event. function is

function addStepConfiguration(id,mystrip,comment,error,submitid,i) {
 $(id).addEvent('submit', function(e) {
  e.stop();
  $(submitid).setStyle('display','none');
  loading_Img(i);
  this.set('send', {
   onComplete: function(responseText) {
    $('loading_img'+i).innerHTML = '';
    SplittedResText = responseText.split("|");
    if(SplittedResText[1]=='undefined') {
     $(error).innerHTML=SplittedResText[0];
    } else {
     $(comment).innerHTML=SplittedResText[0];
     $(mystrip).set('class',SplittedResText[1]);
     removeMsg.delay(20,'',error);
     removeMsg.delay(1500,'',comment);
    }
    $(submitid).setStyle('display','block');
   }
  });
  this.send();
 });
}

When i submit a form say first one then it submitted and give response normally, but in second time without page refresh, it abort the request one time. in third attempt it abort 2 times..then go on +1 each time. It gives no error, just abort and again request automatically. i can't understand what is the problem. please any one can help me.