hi
looks like there is no way of doin this via javascript...
but u're able 2 check what was selected & ask 2 select smth that u want...
<html>
<head>
<title>forms</title>
<script>
function checkit(){
var str=document.forms.form1.fill.value
var len=str.length
var pos=str.lastIndexOf('.')+1
var rest=len-pos
var ext=str.substr(pos,rest)
if (ext!='gif' && ext!='jpg')
alert('u shuld select some picture')
}
</script>
</head>
<body bgcolor="#FFFFFF">
<form name=form1 >
<input type=button value="c file accepts" onclick="checkit()">
<input type=file name=fill >
</form>
</body>
</html>
and then set checkit() onsubmit or whatever u want...
hope that helped...
regards, vic