This code works in IE (preview uploaded images)
How to make it working in Mozilla?

Code:
 
function DoPreview(field, img) {
 
 var img = document.getElementById(img);
 var field = document.getElementById(field);
  
 //var new_img = new Image();
 img.width = 100;
 img.src = field.value;
}
  
<input type="file" name="patient_file" id="patient_file" onFocus="DoPreview('patient_file','patient_img')">