Gracias.
Código HTML:
<head><script type="text/javascript"> var file_selected = false; function showNoFile() { if(!file_selected) { alert('No file selected!'); } // or anything else } </script></head> <body> <div align="center"> <table width="650px" border='0' cellspacing='0' cellpadding='0'> <tr> <td ><form><input type="button" value="Download CSV model" onClick="window.location.href='./templates/Import.csv'"></form><form><input type="button" value="Download XLS model" onClick="window.location.href='./templates/Import.xls'"></form></td> </tr> <tr> <td >Please select file to upload:</td> </tr> <tr> <form action='import.php' method='post' enctype='multipart/form-data'> <td > <input name='archivo' type='file' class='casilla' onchange="file_selected = true;" size='35' /> <input name='enviar' type='submit' class='boton' id='enviar' value='Upload File' onclick='showNoFile();' /> <input name='action' type='hidden' value='upload' /> </td> </form> </tr> </table> </div> </body>