I have the following function in a .js file in index.html
function getValues(){ $.ajax({ type: \'POST\', url: \"http://localhost/getData/getdata.php\
AJAX needs a webserver to communicate with for it to be able to retrieve any data; otherwise its just talking to a wall. Running the script without a webserver is like trying to make a call with no cell-service. :D