File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to reset the struts html file upload filed?

 
Pooja Karthik
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 188
Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
use
this works for me.
 
Pooja Karthik
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Getting 0 is null or not an object error whil using the code.

 
Sanjeev Kumar Ramineni
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic