If I understand your question right, I think a reset button should do the job right ?
something like this: <input type="reset" value='Clear Input' name="reset1" onclick="doReset(document.listForm);return false"> Vineith On Mon, Dec 28, 2009 at 6:16 AM, Rafael Taboada <kaliman.fore...@gmail.com>wrote: > Puedes usar javascript: > > function limpiarText(){ > var idUpload=document.getElementById("idUpload"); > var frm=document.getElementById("frm"); > idUpload.setAttribute("value",""); > frm.reset(); > } > > > <s:form id="frm" action="doUploadFile" method="post" > enctype="multipart/form-data"> > <input name="upload" id="idUpload" type="file" class="file" size="1" > onclick="limpiarText()" /> > </s:form> > On Mon, Dec 28, 2009 at 2:12 AM, Saeed Iqbal <saee...@gmail.com> wrote: > > > If you have not submitted the form and you want this functionality > > then you are talking about ajax file upload > > > > struts doesnt provide ajax file upload but you can do that in struts > > using other libraries > > > > On Monday, December 28, 2009, Mageshwaran <mageshwa...@dhyanit.com> > wrote: > > > I have not submitted the form. > > > I just only selected the file using file dialog. > > > > > > It would be helpful if you give the code snippet to implement in Java > > Script. > > > > > > Magesh. > > > > > > > > > Saeed Iqbal wrote: > > > > > > It gets submitted after post > > > > > > if you want to clear maybe use javascript to clear > > > > > > On Monday, December 28, 2009, Mageshwaran <mageshwa...@dhyanit.com> > > wrote: > > > > > > > > > Hi All, > > > In my jsp code i had used "<s:file name="uploadFile" > label="File" > > size="20" onkeypress = "killEvent(event)"/>" for file upload using > IFrame. > > > > > > The issue is if i select a file using file dialog, there is no option > to > > clear the selected text. Can any one help me how to clear the uploaded > file > > path text? > > > > > > Thanks in Advance, > > > Magesh. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > Saeed Iqbal > > Independant Consultant > > J2EE - Application Architect / Developer > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > -- > Rafael Taboada > Software Engineer > > Cell : +511-992741026 > > "No creo en el destino pues no me gusta tener la idea de controlar mi vida" >