aspose file tools*
The moose likes Struts and the fly likes how to reset the struts html file upload filed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to reset the struts html file upload filed?" Watch "how to reset the struts html file upload filed?" New topic
Author

how to reset the struts html file upload filed?

Pooja Karthik
Greenhorn

Joined: May 10, 2010
Posts: 5
Am trying to reset the struts html file upload filed. Am trying to set as "" or null by using javascript. But it is not working. Please let me know the solution.
debraj mallick
Ranch Hand

Joined: Mar 08, 2011
Posts: 188

hi there,
use
this works for me.
Pooja Karthik
Greenhorn

Joined: May 10, 2010
Posts: 5
Getting 0 is null or not an object error whil using the code.

Sanjeev Kumar Ramineni
Greenhorn

Joined: Jul 14, 2010
Posts: 12
Hi Pooja,

One solution to this problem is to reset the complete form by

document.forms[0].reset(); or document.formName.reset();

The other solution for the same is described in the link below

http://gusiev.com/2009/04/clear-upload-file-input-field/

Regards,
Sanjeev.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to reset the struts html file upload filed?