Wednesday, October 6, 2010

This function used with the onclick event of File Html Control, this shows the image when You click on the / File Html Control or “Browse” image

function DoPreview()
{
var filename = document.form1.filesent.value;
var Img = new Image();
if (navigator.appName == "Netscape")
{
alert("Previews do not work in Netscape.");
}
else
{
Img.src = filename;
document.images[0].src = Img.src;
}
}

No comments: