You can use the event change, in javascript. Then you send the form when the file input triggers this event.
Example:
file = document.getElementById("file");
form = document.getElementById("form");
file.addEventListener('change', function(){ //quando o input de arquivo mudar...
form.submit(); //...o form é enviado
})
<form enctype="multipart/form-data"
method="post"
action="seu_script.php"
id="form">
<input type="file" name="arquivo" id="file" />
</form>
Inside the stack overflow will not work because it prevents form Submit, but you can see it working on: http://jsfiddle.net/Lpppdfwm
What have you tried?
– durtto
At first I tested several things but deleted excluding... The Vb code of the button is here: "<div> <Asp:Label ID="Label2" runat="server">File:</Asp:Label>" "<Asp:Fileupload ID="fuArchive" runat="server" Width="400px" Enabled="true" Cssclass="upload"/> </div>"
– Mariane Ribeiro
I got it . . .
– durtto