aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Validating file extension problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Validating file extension problem" Watch "Validating file extension problem" New topic
Author

Validating file extension problem

siddharth paul
Greenhorn

Joined: Apr 30, 2008
Posts: 20
hii all
in my code i m uploading a file with .doc extension
its working fine and giving alert when extension is not .doc but the problem is when it is different file extension, after the alert it is not clearing the field.
siddharth paul
Greenhorn

Joined: Apr 30, 2008
Posts: 20
using reset as a solution will reset the whole page but i want only file field to be reset.
what are the security restriction for resetting a file field.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not set the value of the field since it is a security concern.

You can try ext.reset() and see if that works, I am guessing that it will not.

Eric
 
jQuery in Action, 2nd edition
 
subject: Validating file extension problem
 
Similar Threads
why javaw file io dose not work properly
How to get another function's value in javascript?
Check for special characters.
Passing a Variable value from one Method to another Method
Reading RTF File in Java