Start New Discussion within our Web Development Community

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.

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.

This article has been dead for over six months. Start a new discussion instead.