I'm taking a quick stab at a light weight file upload facility. There's been quite a few answers on SO regarding using jQuery to upload a file to the server, which I want to avoid. I'm looking at way to upload a file to the server for validation when the file has been selected using plain Javascript (no JS libraries) Key questions are: 1. Why doesn't the AJAX call work? 2. Once the 'Upload' button has been pressed, I'd like to verify on Server end that file name is the same, if the same, do nothing, if different, stop current Server processing, and start anew - is it possible to do that in PHP? Current state of source files are below: html: php file: Solved Use the FormData object from XMLHttpRequest level 2. var formData = new FormData(); var fileInput = document.getElementById('input_file'); var file = fileInput.files[0]; formData.append("thefile", file); request.send(formDat...