Q:

submit form as soon as file was selected

I have following html form: 
<form method="POST"  action="uploadImage" enctype="multipart/form-data">
                        <input type="file" class="file" name="file"/>
                        <input type="submit" value="Upload">
    </form>

I see two things on page
1 - file selector
2 - upload button
I want to avoid submit button and form should be submitted right after file was selected.
Can you help me?

A:

Maybe this helps you:
$('.file').change(function(){
    $('form').submit();
});

