javascript - Call function on file upload -


i have form i'm using upload files. in current situation if user choose image computer have click button upload upload image. i'm trying find way skip step button pressing.

how call javascript function when file selected user ?

the onchange event fired when user specify file upload filed. go this:

<input type="file" name="somename" id="uploadid" /> 

javascript:

var el = document.getelementbyid('#uploadid'); el.onchange = function(){   // code... }; 

however, javascript validation idea make sure actual validation on server-side :)


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -