﻿/* 



BSL CHECKFORM -- Versione 1.0  |  (C) Marco Trevisan aka Da Bazzmann?

Mail to: info@bazzmann.com

Website: http://www.bazzmann.com



Questa libreria di script, permette di controllare i moduli online per l'invio di dati.



< Utilizzo di questo script >



L'utilizzo dello "BSL CHECKFORM" ? libero purch? se ne venga fatto esplicito

riferimento all'autore originale mantenendo l'integrit? del file in ogni

sua parte (compresa questa intestazione) poich? non ne danneggia il suo


funzionamento.



*/


// Autore originale: roberto@probo.it 

// Ricordarsi di inserire onsubmit="return Form_Validator(this)" nel campo FORM ACTION! 

 

 

//funzione di validazione msg 

function Form_Validator(theForm){ 

 

 


  // Controlla il campo Nome 


  if (theForm.elements[0].value == "") 

  { 

    alert('Bitte f\u00FCgen Sie Ihren Familienname ein.'); 


    theForm.elements[0].focus(); 

    return (false); 

  } 

 

  // Controlla il campo Cognome 

  if (theForm.elements[1].value == "") 

  { 

    alert('Bitte f\u00FCgen Sie Ihren Vorname  ein.'); 

    theForm.elements[1].focus(); 

    return (false); 

  } 

 

  // Controlla il campo Indirizzo 

  if (theForm.elements[2].value == "") 

  { 

    alert('Bitte f\u00FCgen Sie Ihre Adresse  ein.'); 

    theForm.elements[2].focus(); 

    return (false); 

  } 

 

 

  // Controlla il campo Stato 

  if (theForm.elements[3].value == "") 

  { 

    alert('Bitte f\u00FCgen  Sie Ihren Staat ein.'); 

    theForm.elements[3].focus(); 

    return (false); 

  } 





  

   // Controlla il campo Telefono 

  if (theForm.elements[4].value == "") 

  { 

    alert('Bitte f\u00FCgen  Sie Ihren Telefonnummer.'); 

    theForm.elements[4].focus(); 

    return (false); 

  } 




  // Controlla il campo E_Mail 


  if (theForm.elements[6].value == "") 

  { 

    alert('Bitte f\u00FCgen Sie Ihre elektronische Post  ein.'); 

    theForm.elements[6].focus(); 


    return (false); 

  } 



// Controlla il campo E_Mail, che sia un'indirizzo valido 

  if ((theForm.elements[6].value.indexOf("@")<=0)||(theForm.elements[6].value.indexOf(".")<=0)) 

  { 

    alert('Format nicht g\u00FCltig f\u00FCr elektronische Post. Vielleicht haben Sie die @ nicht eingef\u00FCgt'); 

    theForm.elements[6].focus(); 

    return (false); 

  } 

  // Controlla il campo Persone 

  if (theForm.elements[7].value == "") 

  { 

    alert('Bitte f\u00FCgen  Sie die Zahl der Personen.'); 

    theForm.elements[7].focus(); 

    return (false); 

  } 


   // Controlla il campo Arrivo 

  if (theForm.elements[8].value == "") 

  { 

    alert('Bitte f\u00FCgen Sie Ihren  Ankunftstag ein.'); 

    theForm.elements[8].focus(); 

    return (false); 

  } 
    // Controlla il campo Partenza 

  if (theForm.elements[9].value == "") 

  { 

    alert('Bitte f\u00FCgen Sie Ihren Abreisetag  ein.'); 

    theForm.elements[9].focus(); 

    return (false); 

  }

 }

 


