In Internet Explorer 7 preview images are not shown
<p>My code is working fine in Firefox and Internet Explorer 6 but Internet Explorer 7 is not showing images.</p>

<p>Here is the code,</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function ShowImage()
    {
        //document.getElementById('videoupload').valuedocument.getElementById('videoupload').value.replace( "file:///", "")
        var img = document.createElement("IMG");
        if(document.all)
            img.src = document.getElementById('videoupload').value;
        else if(window.sidebar)
        {
            //  solution for FF
            img.src = document.getElementById('videoupload').files.item(0).getAsDataURL();
        }
        else
            img.src = document.getElementById('videoupload').value;

        document.getElementById('show').appendChild(img);
        //alert(img.src);
    }
&lt;/script&gt;
&lt;form name="frmlist" enctype="multipart/form-data" method="post"&gt;
      Filename: &lt;INPUT type="file" id="videoupload"&gt;
      &lt;INPUT type="button" id="btn_video" onClick="ShowImage();" value="Upload"&gt;
 &lt;/form&gt;
 &lt;div id="show"&gt;&lt;/div&gt;
</code></pre>
