I hava an input of uploading file.
<input type="file" name="data" id="inFile" style="display: none"/>
<button type="button" name="btn" onClick="browse()">Choose file</button>
Browser will show a popup window of choosing file when the input is clicked.
I want to close the popup window using javascript or any JS library.
var timeout;
function browse(){
var fileElem = document.getElementById("inFile");
fileElem.click();
timeout = setTimeout(closeWindow, 5000);
}
function closeWindow(){
// close filepicker window if window is opened.
}
Can it be achieved? How to do? Thanks.
I want to close filepicker window automatically.