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  
Old 11-06-2007, 05:52 AM
velhari velhari is offline
D-Web Programmer
 
Join Date: Mar 2007
Location: Chennai
Posts: 59
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
  #2  
Old 11-12-2007, 09: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 Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
file uploading? saravanan Java Server Pages (JSP) 3 10-19-2008 11:50 PM
Showing the Image file thumbnail view in ListView control using VC++ 6.0 prabhat.singh C and C++ Programming 0 01-17-2008 09:53 PM
How to show an image containing xml file in .net cf theone Mobile Software Development 1 07-25-2007 02:11 AM
How to convert a word document/text document/PDF file into an image file? kingmaker C# Programming 0 07-16-2007 10:23 PM
How to monitor image server vadivelanvaidyanathan Server Management 3 03-16-2007 07:01 AM


All times are GMT -7. The time now is 03:04 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0