Can any one pf you please tell me how to clear the File upload control value using javascript.
A:
function ClearFileUpload()
{
var fil = document.getElementById("FileUpload1");
fil.select();
n=fil.createTextRange();
n.execCommand('delete');
fil.focus();
}
susanthosh
2010-02-09 08:21:49
A:
Due to security reasons there is no direct access to the value of a file upload control on the client using javascript.
What you could to is deleting the element out of the dom and recreating it. Have a look at this link for an example
Andre Kraemer
2010-02-09 08:31:34
we canm clear the file upload control text field. Try the code given in the next answer. I have achieved my expectation through that script.
susanthosh
2010-02-09 14:50:59