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

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -