<https://lh4.googleusercontent.com/-q35RhGZIN8Q/UHiKu2yMdtI/AAAAAAAACZY/PzYBDz5AS0o/s1600/img.png>
I am using Firebug v1.10 with Firefox v15 to run my javascript. The script 
is sending POST request for several times inside for loop. Below is the 
script snippet-

var elements = document.getElementsByTagName('a');
   
for (var i = 0; i < elements.length; i++) {
   var http = new XMLHttpRequest();
   var params = 'uid='+i;
   http.open('POST','/home/index.php', true);

   http.setRequestHeader('Content-type', 
'application/x-www-form-urlencoded; charset=UTF-8');
   http.setRequestHeader('Content-length', params.length);
/*
   http.onreadystatechange = function() {
      if(http.readyState == 4 && http.status == 200) {
         alert('Connected!!!');
      }
   }
*/
   http.send(params);
}

After running, requests are not sent to server. Screenshot of the firebug 
is attached. Where is the error???

-- 
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug

Reply via email to