The task is simple. There is input that causes a dialog box to select a file from the computer. How to put the trigger for the moment when the user clicks OK in this window?

    1 answer 1

    if($('input[type=file]').val() != '') { //действия } 

    those. if the input with the file is not empty - the button was pressed! trigger will not twitch again if the file has not been selected!

    • No, it does not work. The input is empty even when I select the file. - Svyatoslav