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??
<script type="text/javascript"> 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 > 0) document.getElementById('prevImage').style.display = 'block'; } </script> <div class="uploading_block_inner"> <div class="uploaded_img_inner"><img id="prevImage" style="display:none;" width="91" height="91" /></div> <div class="submit_button_upload"> <div class="upload"><input type="file" id="" name="myImage" onchange="setImage(this);" /></div> </div> <div class="upload_submit_inner"><input type="submit" name="" value="" /></div> </div>