Try the value property, like this:
var file1= document.getElementById("FileUpload1");
var file2= document.getElementById("FileUpload2");
if(file1.value == file2.value){
alert("Duplicate ");
}
you form should do the following to override the behaviour of the submit button :
<form method="post" onsubmit="return doSomething()">
<input type="file" name="file1">
<input type=submit>
</form>
in you doSomethingme thod do the following :
function doSomething(){
// if you dont want to sumbit return false ;
return false;
//if you want to submit return true
return true;
}
and plese give me some feedback
Hope that helps .