Monday, May 20, 2024
142
rated 0 times [  144] [ 2]  / answers: 1 / hits: 29262  / 13 Years ago, wed, january 25, 2012, 12:00:00

how can I reset file input in IE, I used the following and it worked in chrome and FF but not IE



fileInputElement.value=



what's the alternative in IE ?


More From » internet-explorer

 Answers
10

If fileInputElement is on its own in the form fileInputForm, you can do:



window.fileInputForm.reset();


Otherwise for IE you'll have to replace the element with a clone:



fileInputElement.parentNode.replaceChild(
fileInputElement.cloneNode(true),
fileInputElement
);

[#87797] Tuesday, January 24, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jadyngraysons

Total Points: 455
Total Questions: 109
Total Answers: 98

Location: Trinidad and Tobago
Member since Fri, May 8, 2020
4 Years ago
jadyngraysons questions
Thu, Apr 23, 20, 00:00, 4 Years ago
Sat, Jan 18, 20, 00:00, 4 Years ago
Tue, Dec 31, 19, 00:00, 4 Years ago
;