on the form i am writing, there are 2 file fields far apart from each other, so a user does not see them on the same page level... therefore i think it would be a good idea to write a validation check to see if the user accidently entered the same file in both fields... however, i'm having a difficult time trying to imagine how i would do that...
perhaps something like the following?
Expand|Select|Wrap|Line Numbers
- function ValidateDuplicateFile()
- {
- var File1 = document.form.file1.value;
- var File2 = document.form.file2.value;
- if (File1 = File2){
- alert( "Both of your files are the same" );
- document.form.file1.value.focus();
- return false;}
- return true;
- }