8

Does anyone know how can I find out when the "Open" button was clicked in the dialog window of the file upload?

I just want to do some checks once this has happened (validation etc.) and then perform the upload automatically.

Also - I don't want to use any plugins as I know there are a few.

2
  • 6
    Ok - I've figured it out myself - simply use .change() function - like so: $("#element").change(function() { // do something here }); Commented Aug 11, 2010 at 7:02
  • 14
    You should resolve your own question with an answer so it disappears from the "unanswered" filter list. Commented Aug 10, 2012 at 10:45

1 Answer 1

1

But the file dialog opens upon clicking on the <input type="file" /> field.

So you could even do..

$("#element").click({
   //dialog opening now
});

.change() would trigger only if you actually select something that differs from the previous value, if I'm not wrong.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.