1,105,633 Community Members

preview image

Member Avatar
chandub
Newbie Poster
18 posts since Jan 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hai everybody am using following code to preview the image before uploading it. but am unable to display the image please help me.

<SCRIPT type="text/javascript">

function preview(what){
	document.getElementById("previewField").src=what.value;
}
</SCRIPT>


	<INPUT type="file" id="picField" onchange="preview(this)">
	<IMG id="previewField" alt="Preview">

thank you.

Member Avatar
peter_budo
Code tags enforcer
7,939 posts since Dec 2004
Reputation Points: 2,502 [?]
Q&As Helped to Solve: 1,028 [?]
Skill Endorsements: 66 [?]
Moderator
Featured
 
0
 

JavaScript is not JSP(Java Server Pages). Please take care where you post your questions.

Post moved

Member Avatar
pritaeas
mod_pritaeas
11,317 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
0
 
Member Avatar
Troy III
Practically a Posting Shark
891 posts since Jun 2008
Reputation Points: 174 [?]
Q&As Helped to Solve: 119 [?]
Skill Endorsements: 10 [?]
 
0
 

hai everybody am using following code to preview the image before uploading it. but am unable to display the image please help me.

<SCRIPT type="text/javascript">

function preview(what){
	document.getElementById("previewField").src=what.value;
}
</SCRIPT>


	<INPUT type="file" id="picField" onchange="preview(this)">
	<IMG id="previewField" alt="Preview">

thank you.

Image preview before upload, is possible (up until now) only on Explorer UAs.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article