views:

22

answers:

1

I am in a predicament with input files. The project I am working on has added a jQuery extension that masks all input types and makes them more 'vibrant'. However it has also caused a lot of trouble in the updating of what is listed in these inputs. One such problem is the input with type file. It currently will not change what is being uploaded after the very first selection. So I am wondering if there is a command you can use to do something after the user has selected a file (pressed the Open) button.

+1  A: 

I'm not exactly positive on what you're asking for but: you can bind logic to the input's onchange event. This will run the code attached to it after the user has selected their file(s) and pressed the "Open" or "Cancel" buttons.

Here's an example using jQuery (since you've already stated you're using it):

$("#yourFileInput").change( function() {
  alert("Hey, you changed me!");
}
t3hb4tman