<SCRIPT LANGUAGE="JavaScript">
<!--
function DoSubmit(obj) {
var Data = obj.Data.value;
var DA_Ora = obj.DA_Ora.value;
var A_Ora = obj.A_Ora.value;
var IDCliente = obj.IDCliente.value;
var Descrizione = obj.Descrizione.value;
var strMailFilter = /^.+@.+\..{2,3}$/;
var strIllegalChars = /[\(\)\<\>\;\:\\\*\+\=\"\[\]]/;
var strOra = /^([0-1][0-9]|[2][0-3])

[0-5][0-9])$/
var submitform = true;
var error = '>>> MODULO -------------------------------------\n\n';
error += ' Attenzione : \n\n';
if (Data.length < 9) {
error += ' > Il Campo Data è un campo obbligatorio \n';
submitform = false;
}
if (Data.length > 10 ) {
error += ' > Il Campo Data può contenere massimo 10 caratteri \n';
submitform = false;
}
if (Data.length > 0 && Data.match(strIllegalChars)) {
error += ' > Il Campo Data contiene caratteri non consentiti \n';
submitform = false;
}
if (DA_Ora.length < 5) {
error += ' > Il Campo Ora DA è un campo obbligatorio \n';
submitform = false;
}
if (DA_Ora.length > 5 ) {
error += ' > Il Campo Ora DA può contenere massimo 5 caratteri \n';
submitform = false;
}
if (DA_Ora.length > 0 && DA_Ora.match(strOra)) {
error += ' > Il Campo Ora DA contiene caratteri non consentiti \n';
submitform = false;
}
if (A_Ora.length < 5) {
error += ' > Il Campo Ora A è un campo obbligatorio \n';
submitform = false;
}
if (A_Ora.length > 5 ) {
error += ' > Il Campo Ora A può contenere massimo 5 caratteri \n';
submitform = false;
}
if (A_Ora.length > 0 && A_Ora.match(strIllegalChars)) {
error += ' > Il Campo Ora A contiene caratteri non consentiti \n';
submitform = false;
}
if (obj.IDOperatore.options[obj.IDOperatore.selectedIndex].value == '') {
error += ' > Il Campo Per è un campo obbligatorio \n';
submitform=false;
}
if (IDCliente.length < 1) {
error += ' > Il Campo Da è un campo obbligatorio \n';
submitform = false;
}
if (IDCliente.length > 50 ) {
error += ' > Il Campo Da può contenere massimo 50 caratteri \n';
submitform = false;
}
if (IDCliente.length > 0 && IDCliente.match(strIllegalChars)) {
error += ' > Il Campo Da contiene caratteri non consentiti \n';
submitform = false;
}
if (Descrizione.length < 5) {
error += ' > Il Campo Descrizione è un campo obbligatorio \n';
submitform = false;
}
if (Descrizione.length > 1000 ) {
error += ' > Il Campo Descrizione può contenere massimo 1000 caratteri \n';
submitform = false;
}
if (Descrizione.length > 0 && Descrizione.match(strIllegalChars)) {
error += ' > Il Campo Descrizione contiene caratteri non consentiti \n';
submitform = false;
}
if (submitform) {
obj.submit();
}
else {
error += '\n--- Fine Controllo ---\n\n';
alert (error);
return false;
}
}
-->
</script>