Hi
The below javascript code its not working very well, as there it not showing error message only when i run the application is showing yellow arrow next to debugger; line and the application is just freezing.
<script type="text/javascript">
var validFilesTypes = ["jpg", "png"];
function CheckExtension(file) {
debugger;
var filePath = file.value;
var ext = filePath.substring(filePath.lastIndexOf('.') + 1).toLowerCase();
var isValidFile = false;
for (var i = 0; i < validFilesTypes.length; i++) {
if (ext == validFilesTypes[i]) {
isValidFile = true;
break;
}
}
if (!isValidFile) {
file.value = null;
var mssg = "Image should be " + validFilesTypes.join(", ") + " format only";
//var ...
Go to the complete details ...