IntelliJ Java IDE
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
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply 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: 180

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: 10
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.
 
 
subject: how to reset the struts html file upload filed?
 
Threads others viewed
html:file
upload file question
Resource not found
Uploading file
REST Fileupload client
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture