Upload Preview Images

  • mansite_2003
  • Beginner
  • Beginner
  • mansite_2003
  • Posts: 39

Post 3+ Months Ago

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

Code: [ Select ]
<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;" />
  1. <script>
  2. function preview() {
  3. field = document.getElementById( 'upload' ).value;
  4. image = document.getElementById( 'previewIMG' );
  5. path = 'file://'+ field;
  6. path = path.replace(/\/, '/'); // Fix Windows paths
  7. image.src = path;
  8. image.style.display = 'block';
  9. image.style.width = "200px";
  10. image.style.height = "150px";
  11. }
  12. </script>
  13. <input type="file" name="upload" id="upload" onchange="preview()"; />
  14. <br /><br />
  15. <img id="previewIMG" style="display:none;" />



Here is the original link
http://forums.invisionpower.com/lofiver ... 26158.html
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 58 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.