To send the request on server open() and send() can be used in ajax.
These are the method of XMLHttpRequest object.
xhttp.open("GET", "ajax_info.txt", true);
xhttp.send();
open- specifies the type of request
open(method, url, async)- method- the type of request GET or POST.
GET- for sending small data
POST- for sending large data
url- the server address.
for cached result we create a unique id and append in the url.
xhttp.open("GET", "demo_get.asp?t=" + Math.random(), true);
xhttp.send();
async- true or false
true = asynchronus
false = synchronus
send()- if GET is used
send- If POST is used.
0 Comment(s)