I have the following function in a .js file in index.html
function getValues(){
$.ajax({
type: \'POST\',
url: \"http://localhost/getData/getdata.php\
I'm tickled pink with myself because reading the answers people posted about how you can't do AJAX "locally" without a Web server led me to the solution as to how you can do it. With JavaScript, the XMLHttpRequest() object's methods are mostly produced by the browser and you need to leave out the one produced by the Web server (xmlhttp.status == 200). The following works:
AJAX Request/Response