added validation for uploading a photo. Users must select a photo before they hit the upload button.

This commit is contained in:
mb863 2010-07-01 19:10:34 +00:00
parent 98b71db1f4
commit e50507efee
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,21 @@
function validate_upload_file(form_passed) {
var msg="";
if (form_passed.datafile.value == "") msg += "Please browse and select a photo\n";
if (msg == "") {
document.form_upload_image.submit();
} else{
alert(msg);
return false;
}
}