Last change
on this file since 31793 was 31793, checked in by kjdon, 7 years ago |
committing core files for pei jones project
|
File size:
611 bytes
|
Line | |
---|
1 |
|
---|
2 |
|
---|
3 | function checkrequired(which) {
|
---|
4 | var pass=true;
|
---|
5 | for (i=0;i<which.length;i++) {
|
---|
6 | var tempobj=which.elements[i];
|
---|
7 | if (tempobj.name.substring(0,8)=="required") {
|
---|
8 | if (((tempobj.type=="text"||tempobj.type=="textarea")&&
|
---|
9 | tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
|
---|
10 | tempobj.selectedIndex==0)) {
|
---|
11 | pass=false;
|
---|
12 | break;
|
---|
13 | }
|
---|
14 | }
|
---|
15 | }
|
---|
16 | if (!pass) {
|
---|
17 | shortFieldName=tempobj.name.substring(8,30).toUpperCase();
|
---|
18 | alert("The "+shortFieldName+" field is a required field.");
|
---|
19 | return false;
|
---|
20 | } else {
|
---|
21 | return true;
|
---|
22 | }
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.