I have a form that lets users upload a image of them self. I need an jQuery event handler for when the input in uploaded.
<script>
$('#imageFile').someeventhander(function(){do some work son!});
</script>
<input id="imageFile" type="file">
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To upload a file you need the server to accept it and send a response back to the browser. jQuery can then use the response to trigger an event or call a function. So the answer depends on how your server is handling the upload.
swfUpload is a popular solution that uses a small Flash movie the handling the uploading. There is a jQuery plugin for it that triggers numerous events that allow you to monitor start/progress/error/completion of the upload.