Hello Everyone,
I have found the sample upload preview images which is in need to me...
I've found more sample but all problem is not to load using a IE 7 browser. Anyone solving this problem? please help me and give me the right direction to solve this problem.
Thank you in advance,
Manuel M.
Here is the code
<script>
function preview() {
field = document.getElementById( 'upload' ).value;
image = document.getElementById( 'previewIMG' );
path = 'file://'+ field;
path = path.replace(/\/, '/'); // Fix Windows paths
image.src = path;
image.style.display = 'block';
image.style.width = "200px";
image.style.height = "150px";
}
</script>
<input type="file" name="upload" id="upload" onchange="preview()"; />
<br /><br />
<img id="previewIMG" style="display:none;" />
- <script>
- function preview() {
- field = document.getElementById( 'upload' ).value;
- image = document.getElementById( 'previewIMG' );
- path = 'file://'+ field;
- path = path.replace(/\/, '/'); // Fix Windows paths
- image.src = path;
- image.style.display = 'block';
- image.style.width = "200px";
- image.style.height = "150px";
- }
- </script>
- <input type="file" name="upload" id="upload" onchange="preview()"; />
- <br /><br />
- <img id="previewIMG" style="display:none;" />
Here is the original link
http://forums.invisionpower.com/lofiver ... 26158.html