I can't seem to make onchange fire for an input type of file. If I directly call an alert (like onchange="alert('a')"), it fires but if I call a user-defined function with only an alert inside, it doesn't. see below:
the html:
<input type='file' value='C:\fakepath' onchange="previewFile()"/>
the script:
function previewFile() {
alert("a");
}