IT Community - Software Programming, Web Development and Technical Support

Preview Image before Uploading File to Server

This is a discussion on Preview Image before Uploading File to Server within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hello all, I want to preview the image before it get upload to server. for this, i had done the ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 11-06-2007, 06:52 AM
velhari velhari is offline
D-Web Programmer
 
Join Date: Mar 2007
Location: Chennai
Posts: 67
velhari is on a distinguished road
Send a message via AIM to velhari
Question Preview Image before Uploading File to Server

Hello all,

I want to preview the image before it get upload to server.
for this, i had done the following stuff... This works fine in IE browser, and not in Firefox
Please help me out to solve this problem....

Code:
<script language="javascript">
function PreviewImage( FileObj )
{
	var vFilePath = FileObj.value;
	var oImage   = document.getElementById("ImgPreview");
	oImage.src   = vFilePath;		
}
</script>
HTML Code:
<form action="" id="frmUpload" name="frmUpload"> <input type="file" name="fileUpload" id="fileUpload" onChange="PreviewImage(this)"> <img id="ImgPreview"> <input type="submit" name="btnSubmit" value="Submit"> </form>
__________________
Regards,
VELHARI
I am not totally useless. I can be used for a bad example
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-12-2007, 10:21 PM
Senthilkumar Senthilkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 93
Senthilkumar is on a distinguished road
Default Re: Preview Image before Uploading File to Server

In Firefox browser we cant get the client side path of the image selected for uploading. So the image preview will not work.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
file uploading? saravanan Java Server Pages (JSP) 3 10-20-2008 12:50 AM
How Create print preview page dynamically in ASP.NET KiruthikaSambandam ASP and ASP.NET Programming 4 03-21-2008 04:42 AM
How to show an image containing xml file in .net cf theone Mobile Software Development 1 07-25-2007 03:11 AM
How to convert a word document/text document/PDF file into an image file? kingmaker C# Programming 0 07-16-2007 11:23 PM
How to monitor image server vadivelanvaidyanathan Server Management 3 03-16-2007 08:01 AM


All times are GMT -7. The time now is 09:43 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0