My code works perfectly when I use this:
ajax.open("post","a.php",true);
However, the problem arises when I attempt to send data to an external file like this:
ajax.open("post","http://www.example.com/a.php",true);
Unfortunately, it doesn't work in this case. Can anyone suggest a solution?