Hello, please help to implement (or give a link where there is a way to implement) uploading images to the server (with further processing using PHP) using AJAX, without using the jQuery library.
1 answer
The key is a built-in XMLHttpRequest browser object.
img = document.getElementById('id of input with type file'); xmlhttp=new XMLHttpRequest(); xmlhttp.open("POST","ajax_test.asp",true); xmlhttp.send(img.value); most likely will not work, but the idea is
http://www.w3schools.com/ajax/ajax_xmlhttprequest_create.asp
http://www.w3schools.com/ajax/ajax_examples.asp
https://gist.github.com/ebidel/2410898
|