javascript - Start upload after choosing a file, using jQuery. -
after having chosen file upload, want file uploaded database without click of button. how done using jquery?
i choose file this: http://i.stack.imgur.com/0408t.gif
<input type="file" valign="baseline" />
assuming you're using form:
// select file input (using id faster) $('input[type=file]').change(function() { // select form , submit $('form').submit(); });
edit: to keep answer up-to-date:
there nice way upload files via ajax without hacks described here: http://net.tutsplus.com/tutorials/javascript-ajax/uploading-files-with-ajax/
Comments
Post a Comment