1 |
<SCRIPT language="javascript"> |
2 |
function Validation() { |
3 |
|
4 |
var txt = ''; |
5 |
|
6 |
if (document.forms[0].c_source_fk[0].selected) { |
7 |
txt += '- source is mandatory\n'; |
8 |
} |
9 |
|
10 |
if (document.forms[0].c_customer_fk[0].selected) { |
11 |
txt += '- customer is mandatory\n'; |
12 |
} |
13 |
|
14 |
if (document.forms[0].c_type_fk[0].selected) { |
15 |
txt += '- type is mandatory\n'; |
16 |
} |
17 |
|
18 |
if (document.forms[0].c_news_title.value == '') { |
19 |
txt += '- title is mandatory\n'; |
20 |
} |
21 |
|
22 |
if (document.forms[0].c_news_abstract.value == '') { |
23 |
txt += '- abstract is mandatory\n'; |
24 |
} |
25 |
|
26 |
if (txt == '') { |
27 |
return true; |
28 |
} else { |
29 |
alert (txt); |
30 |
return false; |
31 |
} |
32 |
} // End of validation |
33 |
</SCRIPT> |