As I'm using a standard way of validation I can't see how I can control which script runs first... I have a simplified code at uploadtest.php
If you select a file but don't fill anything in the text field the progress bar shows and you can do nothing. Happy for suggestions!