Per referenze: http://www.devguru.com/technologies/...ipt_index.htmlcodice:function TestoVuoto(campo,nome) { if ((campo.value=="") || (campo.value=="- Inserisci il Servizio -")) { alert("Attenzione: il campo '"+nome+"' è obbligatorio!"); campo.focus(); return true; } return false; } function Virgolette(campo,nome) { if(campo.value.match(/\"/) { alert("Virgolette non consentite nel campo "+nome); campo.focus(); return true; } return false; } function CheckInvia(pForm) { with(pForm) if(TestoVuoto(pForm.Domanda,"Domanda")) return false; if(Virgolette(pForm.Domanda,"Domanda")) return false; return true; }

Rispondi quotando