I have a fileupload control, I want to validate the size of the file to 50kb before the done button is clicked.
I did some research on the internet and got this code
<script>
function A() {
var oas = new ActiveXObject("Scripting.FileSystemObject");
var d = document.a.b.value;
var e = oas.getFile(d);
var f = e.size;
alert(f + " bytes");
}
</script>
I am using IE9 but this code is not working for me. I am getting error on the line
var oas = new ActiveXObject("Scripting.FileSystemObject");
How to solve this error?