Quantcast
Channel: HTML File Input Reader and IE Problem
Viewing all articles
Browse latest Browse all 5

HTML File Input Reader and IE Problem

$
0
0

I Have conflict between Internet Explorer and HTML File Uploader  "var reader = new FileReader();"
The below code working in all browsers except Internet Explorer

script type="text/javascript">
        function readURL(input) {
            if (input.files && input.files[0]) {
                var reader = new FileReader();

                reader.onload = function (e) {
                    $('#blah').attr('src', e.target.result);
                }

                reader.readAsDataURL(input.files[0]);
            }
        }
    </script>
<body><form id="form1" runat="server"><input type='file' onchange="readURL(this);" /><img id="blah" src="#" alt="your image" /></form></body>

So any Suggestions to Overcome that issue : Alternatives or workaround to solve that on Internet Explorer ??


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>