anchor.diff:                  if( requests.length ) {
                       oriSuc = requests[0].complete;
       
  +                    // combine data from multiple requests
  +                    if (requests.length > 1) {
  +                       data = deserialize(requests[0].data);
  +                       form = [requests[0].form]
  +                       for (var i=requests.length-1; i>0 ; i--){
  +                          req = requests.pop();
  +                          adata = deserialize(req.data);
  +                          for (key in  Object.keys(adata)){ 
  +                             curKey =   Object.keys(adata)[key] ;                      
  +                             if (curKey.slice(0,12) == "generic_file"){
  +                                data[curKey] = adata[curKey];
  +                                form.push (req.form);
  +                             }
  +                          }
  +                       } 
  +                       requests[0].data = $.param(data);
  +                       requests[0].form = form;
  +                    }    
  +    
                       requests[0].complete = function() {
                            if( typeof oriSuc === 'function' ) oriSuc();
  +                         if (typeof requests[0].form === 'object'){
  +                            for (f in form) {
  +                               form_id = form[f];
  +                               after_ajax(form_id);
  +                            }
  +                         }
                            requests.shift();
                            self.run.apply(self, []);
                       };   
  
positive.code:       before_ajax(form_id);
  
         ajaxManager.addReq({
            queue: "add_doc",
            url: form.attr("action"),
            dataType: "json",
  
negative.code:           }, 
         });
         setTimeout(ajaxManager.runNow(),100);
     }
  
  <% end %>
  
  