Replies Back to Article
Optional Upload?
Commenting out the following foure lines (marked in red)
in the check extensions script worked for me, as follows
comments?
------------------------
function checkFileUpload(form,extensions) { //v1.0
document.MM_returnValue = true;
if (extensions && extensions != '') {
for (var i = 0; i<form.elements.length; i++) {
field = form.elements[i];
if (field.type.toUpperCase() != 'FILE') continue;
// if (field.value == '') {
// alert('File is required!');
// document.MM_returnValue = false;field.focus();break;
// }
if (extensions.toUpperCase().indexOf(getFileExtension(field.value).toUpperCase()) == -1) {
alert('This file is not allowed for uploading!');
document.MM_returnValue = false;field.focus();break;
} } }
}
-------------------------------
SAM
Hi, I may be just plain stupid but I do not understand your fix for the optional upload? Please can you explain exactly what I have to do?
Many Thanks
Phil