This is how I am trying to bind to the change event: I have tried blur as well (and click and...)
$('#newticketform').live('change',function (e){ //newticket form is the form in which my input type=file is contained
$('#my_file_element').MultiFile(); //my_file_element is the input type=file element
});
Should the binding be to the form or input field? I did try both without any difference in behaviour.
When using .on instead of .live the function above is not triggered at all.
I've managed to upload files before loading the form as dynamic content. When loading the form into my main page I have to, of course, bind the event in some way.
This is the what happens: - 1st time: Nothing happens (but he function above is triggered confirmed using alert). I.e. no file is attached to the lista of files to be uploaded. - 2nd time: The file is added to the list.
It seems like the binding is not realised before the first time I try to add a file and the second time it's working.