onchange event is not firing in chrome
<p>I want to select two files from the local system using HTML5 input element. I have written code as follows which is working fine in firefox but is not working in chrome. The onchange event is not firing whether i use addEventListener method or follow old style of input1.onchange = function name. As per my requirement i need to select two files one after another in one case and in all other cases i need to select only a single file. Can you let me know how to make it work on chrome also.</p>

<p>html snippet</p>

<pre><code>&lt;button id="openfolder"&gt;&lt;/button&gt;
</code></pre>

<p>JavaScript snippet</p>

<pre><code>function init() {
    document.getElementById('openfolder').addEventListener("click",
    menu_onclick,false);
}

//I am not appending the element to the document.
function menu_onclick(ev) {
    var input = document.createElement('input');
    input.id = 'selectFile';
    input.type = 'file';                            
    input.addEventListener("change",file_onchange,false);
    input.click();
}

function file_onchange(ev){
    var input1 = document.createElement('input');
    input1.id = 'selectXMLFile';
    input1.type = 'file';
    input1.addEventListener("change",xmlSelect,false);
    input1.click();
}
</code></pre>