AJAX URL

The url parameter of the open() method specifies the address of a file on the server.

This file can be of any type, text file (.txt) file in XML format (.xml) files or dynamic pages PHP, JSP, ASP, ...

If these dynamic pages require parameters passed by GET, also put in the url parameter.

Examples:

xmlhttp.open("GET","file.txt",true); xmlhttp.open("POST","file.txt",true); xmlhttp.open("GET","data.xml",true); xmlhttp.open("POST","data.xml",true); xmlhttp.open("GET","contacts.php?name=ANNA",true); xmlhttp.open("GET","contacts.jsp?name=ANNA",true); xmlhttp.open("GET","contacts.asp?name=ANNA",true); xmlhttp.open("POST","contacts.php?name=AUSTIN",true); xmlhttp.open("POST","contacts.jsp?name=AUSTIN",true); xmlhttp.open("POST","contacts.asp?name=AUSTIN",true);