I am using XMLHttpRequest as a simple one way ajax logging function. No server response is needed. The request does not cross domains.
This code works as expected:
var client2 = new XMLHttpRequest();
client2.open("GET", "program?url=c",true);
client2.send();
alert('sent');
return true;
however, as soon as I remove the alert()
var client2 = new XMLHttpRequest();
client2.open("GET", "program?url=c",true);
client2.send();
return true;
the server never receives the call...
When I step thru this in firebug, I can remove the alert line and once I step thru to the return line the function works as expected. But as soon as I eliminate the debugger (no break) it ceases to work again? very strange. no errors thrown.
what am I missing here?
This is a one way communication to a log file on the server (same domain), no response is needed.
Thanks in advance for any advice... I'm sure I'm just being dense... 