ho fatto ho trovato un vecchio script che avevo fatto tempo fa.
lo posto magari è utile
codice:
<SCRIPT language="JavaScript">
<!--
function news(theForm) {
if (theForm.dove1.value == "0") { alert("Inserisci Voglio Andare"); theForm.dove1.focus(); return (false); }
if (theForm.dove2.value == "0") { alert("Inserisci Voglio Andare in"); theForm.dove2.focus(); return (false); }
if (theForm.partenza.value == "") { alert("Inserisci Partenza"); theForm.partenza.focus(); return (false); }
if (theForm.ritorno.value == "") { alert("Inserisci Ritorno"); theForm.ritorno.focus(); return (false); }
if (theForm.anticipo.value == "0") { alert("Inserisci se sei diposto ad anticipare o posticipare il viaggio"); theForm.anticipo.focus(); return (false); }
if (theForm.alloggio.value == "0") { alert("Inserisci Alloggio"); theForm.alloggio.focus(); return (false); }
if (theForm.sistemazione.value == "0") { alert("Inserisci Sistemazione"); theForm.sistemazione.focus(); return (false); }
if (theForm.adulti.value == "0") { alert("Inserisci Adulti"); theForm.adulti.focus(); return (false); }
if (theForm.trasporto.value == "0") { alert("Inserisci Trasporto"); theForm.trasporto.focus(); return (false); }
if (theForm.newsletter.value == "0") { alert("Scegli se iscriverti alla Newsletter"); theForm.newsletter.focus(); return (false); }
if (theForm.nome.value == "") { alert("Inserisci il tuo Nome, grazie"); theForm.nome.focus(); return (false); }
if (theForm.emailg.value.indexOf('@', 0) == -1) { alert("Inserisci il tuo indirizzo Email corretto, grazie"); theForm.emailg.focus(); return (false); }
if (theForm.emailg.value.indexOf('.', 0) == -1) { alert("Inserisci il tuo indirizzo Email corretto, grazie"); theForm.emailg.focus(); return (false); }
if (theForm.telefono.value == "") { alert("Inserisci il tuo numero di telefono, grazie"); theForm.telefono.focus(); return (false); }
if (theForm.reperibile.value == "") { alert("Inserisci la tua Reperibilità"); theForm.reperibile.focus(); return (false); }
}
//-->
</SCRIPT>