You're right. It's a javascript problem/solution. I got this code from another forum, and it does exactly what I was looking for. Some other guys may find it useful.
<html>
<body>
<script type="text/javascript" language="javascript">
<!--
function dopreview()
{
if (uploadform.userfile.value != '')
document.getElementById("previewimage").src = 'file:///' + uploadform.userfile.value.replace(/\/, '/');
else
document.getElementById("previewimage").src = 'blind.gif';
}
-->
</script>
<form name="uploadform" method="post" type="multipart/form-data">
<input name="userfile" type="file" onChange="dopreview();">
</form>
<img id="previewimage" src="blind.gif">
</body>
</html>
I had some trouble with the onchange event with an earlier version of this code, so I used an onclick event instead and that worked fine.
<img id="previewimage" src="c:/blind.gif" onclick="dopreview()">