<script language='javascript'>
<!--
function jsImagesPreview(img,iid) {

Imagesid = iid;

if(event.srcElement.value.match(/(.jpg|.jpeg|.gif|.png|.JPG|.JPEG|.GIF|.PNG|[0-9]{10})/)) {
document.images[Imagesid].src = event.srcElement.value;
document.images[Imagesid].style.display = '';
}else{

if(img) {
document.images[Imagesid].src = img;
document.images[Imagesid].style.display = '';

} else {
document.images[Imagesid].src = '/images/no_img.jpg';
document.images[Imagesid].style.display = '';
}
}
}
//-->
</script>

<form method="post" action="" name="form" enctype="multipart/form-data">

<input name="image5" type="file" size="20" class="input" onChange="jsImagesPreview('','image5')" onFocus="jsImagesPreview('/images/no_img.jpg','image5')">


<img id="image5" width="120"
height="89" border="0" style="BORDER-RIGHT: #000000
1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM:
#000000 1px solid">

</form>

Posted by [czar]
,