Oh, this is an extremely annoying bug in IE which I forgot about.
If you create an input element dynamically, you can't set its name! On their website, they offer a workaround which is completely against the standard and causes errors in other browsers.
You'll need a try/catch to try the wrong way first and then catch the error and use the correct method. Hacky, but that's what we're used to as web developers.
[code=javascript]try {
file = document.create Element("<input type='file' name='attachmen t"+upload_numbe r+"'>");
} catch (e) {
file = document.create Element("input" );
}
// add setAttribute lines here...[/code]
If you create an input element dynamically, you can't set its name! On their website, they offer a workaround which is completely against the standard and causes errors in other browsers.
You'll need a try/catch to try the wrong way first and then catch the error and use the correct method. Hacky, but that's what we're used to as web developers.
[code=javascript]try {
file = document.create Element("<input type='file' name='attachmen t"+upload_numbe r+"'>");
} catch (e) {
file = document.create Element("input" );
}
// add setAttribute lines here...[/code]
Comment