ram1 ram1 - 2 years ago 121
HTML Question

How do I auto-submit an upload form when a file is selected?

I have a simple file upload form. How do I make it submit automatically when a file has been selected? I don't want the user to have to click the Submit button.

Answer Source

You can simply call your form's submit method in the onchange event of your file input.

document.getElementById("file").onchange = function() {


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download