AJAX - Sending a request to a server
xmlhttp.open("GET","date.php",true);
/*It has been assumed here that date.php is in the same directory.*/
xmlhttp.send(null);
The open() method takes three arguments as described below -
- First argument – The method to use while sending request to the web server i.e. GET or POST.
- Second argument – URL of the server side script
- Third argument – Boolean to specify whether the request should be handled asynchronously or not.
The send() method is used to the request to the server.
source:http://www.botskool.com/programming-tutorials/ajax-tutorials/ajax-basic-tutorial