I am facing one problem one field in my jsp is of the input type - file onblur of that i have written one js function and checking for some validation and then returning true/false accordingly but in this case my page get submitted even though the function returns false can anybody has solution?
function validate(){ if((document.all.filname.value=="") || (document.all.filname.value==null)){ alert("Please enter filename"); return false; } else{ //code to submit the form return true; } }