I am not really sure how to word the question, but I basically have an old javascript that checks file extensions of a user upload BEFORE it is sent to the server for processing. (Just for the admin section of a website.)
Well, I want a div to slideDown() whenever a javascript condition returns true inside a loop (meaning, the file is good to upload).
Code so far:
var thisext = fieldvalue.substr(fieldvalue.lastIndexOf('.'));
for(var i = 0; i < extension.length; i++) {
if(thisext == extension[i]) { return true;
$("#pleasewait").slideDown();
}
}
alert("Please upload ONLY .mp3 files. No other files will work.");
return false;
}
.mp3, or.mpeg3or.mpeg2layer3or.flubber?