Hi
I am very intrested to know how can i preview an image before the image gets uploaded to the server.In my application i can able to preview the uploaded image in the confimation page only.But how can i make a image preview without page gets refreshed.
I followed some code but it works only in IE and ask to run ActiveX controls
[code]
<HEAD>
<STYLE type=text/css>#newPreview {
FILTER: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)
}
</STYLE>
<SCRIPT language=javascript type=text/javascript>
function PreviewImg(imgFile)
{
var newPreview = document.getElementById(“newPreview”);
newPreview.filters.item(“DXImageTransform.Microsoft.AlphaImageLoader”).src = imgFile.value;
newPreview.style.width = “80px”;
newPreview.style.height = “60px”;
}
</SCRIPT>
<TITLE> New Document </TITLE>
<META NAME=”Generator” CONTENT=”EditPlus”>
<META NAME=”Author” CONTENT=””>
<META NAME=”Keywords” CONTENT=””>
<META NAME=”Description” CONTENT=””>
</HEAD>
<BODY>
<input type=”file” id=”picField” onchange=”PreviewImg(this)”>
<div id=”newPreview”></div>
</BODY>
</HTML>
Is there is any other common process to do this functions in all the browser.Is that possible with the help of YUI(Yahoo user Interface) or any other tools.
Thanks