Are there any JavaScript events in type=file
input? I.E. I would like to add an extra file input
upon selecting file in one of allready created:
I think you mean type=file
?
The only meaningful way is use both onclick and onchanged and keep track of the contents to see if it is changed.
Here is the event logged by Firebug when selecting a file with Firebug:
I guess change, is the one you are looking for:
$ ('#your_form_id input[type=file]').live ('change', function () {
$(this).parent ().append ($('<input type="file" />'));
})
you just have to adapt the selector and the previous code should work
I believe onchange
should work.