[Javascript] mailto in submit

Felix bruno.lanciau at cnes.fr
Fri Mar 8 07:50:16 CST 2002


Thank you Bob,

but please look at my code

function verif_champs()
{
 if(document.FormulaireMail.Nom.value=="")
  {
   alert ("Il vous faut saisir votre nom.\nExemple: DUPONT");
   document.FormulaireMail.Nom.focus();

         }


   else if (document.FormulaireMail.Prenom.value=="")
  {
  alert ("Il vous faut saisir votre prenom.\nExemple: Albert");
  document.FormulaireMail.Prenom.focus();
  }

   else if (document.FormulaireMail.texte.value=="")
  {
   alert ("Il vous faut saisir votre MAIL");
   document.FormulaireMail.texte.focus();
  }


 else
  {
   document.FormulaireMail.submit();
   }
}

and this code is called from the html form by a "button" button instead of a
"submit" button:

 <input type="button" OnClick="javascript:verif_champs()" value="ENVOYER">


Am I clear? ... Sorry, I cannot speak english very well

Félix





More information about the Javascript mailing list