how to check if the file name typed is valid if the input type if file

I have a file upload code. The problem is if I choose a file using the browse functionality, it is fine but if I directly type some file name and press a button which takes this input and tries to upload this file to the server, it kind of hangs.

If there some way to check if the file name mentioned is valid?

<td><input name="txtFiplFile" id="txtFiplFile" type="file" size="30" /> </td>

[426 byte] By [jumman007a] at [2007-11-26 17:36:07]
# 1
There's an example of restricting MIME types / Content type for file upload on Google: http://www.oop-reserch.com/mime_example_2.htmlIt also discusses how to restrict the file name.
appy77a at 2007-7-9 0:04:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...