check_form.js
Click here to get the file
Size
1 kB
-
File type
text/plain
File contents
function checkrequired(which){
var pass=true
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i]
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea") &&
tempobj.value=='') ||
(tempobj.type.toString().charAt(0)=="s" &&
tempobj.selectedIndex==-1)) {
pass=false
break
}
}
}
}
if (!pass) {
alert("At least one of the required fields (marked with an asterisk) was left blank. Please complete the form then submit it again.")
return false
} else
return true
}