issue with image uploading in the front end
<p>i need to implement image upload whereby a thumbnail appears alongside the buttons.. i have implemented it using function "getAsDataURL",... its not working in in chrome and safari.... any solution??</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function setImage(file) {
        if(document.all)
            document.getElementById('prevImage').src = file.value;
        else
            document.getElementById('prevImage').src = file.files.item(0).getAsDataURL();
        if(document.getElementById('prevImage').src.length &gt; 0) 
            document.getElementById('prevImage').style.display = 'block';
    }
&lt;/script&gt;


&lt;div class="uploading_block_inner"&gt;
                                &lt;div class="uploaded_img_inner"&gt;&lt;img id="prevImage" style="display:none;" width="91" height="91" /&gt;&lt;/div&gt;
                                &lt;div class="submit_button_upload"&gt;
                                    &lt;div class="upload"&gt;&lt;input type="file" id=""  name="myImage" onchange="setImage(this);" /&gt;&lt;/div&gt;
                                &lt;/div&gt;
                                &lt;div class="upload_submit_inner"&gt;&lt;input type="submit" name="" value="" /&gt;&lt;/div&gt;                             
                            &lt;/div&gt;
</code></pre>
