Serait il possible que quelqu un jette un coup doeil a mon script et maide pour le corriger.
Merci
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Mini-chat</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript">function verifSelection() {if (document.mail_form.nom.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.Prenom.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.champ3.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.champ4.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.champ5.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.champ6.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.champ7.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.champ8.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.champ9.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.champ10.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
} if (document.mail_form.zone_email.value == "") {
alert("VEUILLEZ REMPLIR TOUS LES CHAMPS.")
return false
}
invalidChars = " /:,;'"
for (i=0; i<invalidChars.length; i++) { // does it contain any invalid characters?
badChar = invalidChars.charAt(i)
if (document.mail_form.zone_email.value.indexOf(badChar,0) > -1) {
alert("Votre adresse e-mail contient des caractères invalides. Veuillez vérifier.")
document.mail_form.zone_email.focus()
return false
}
}
atPos = document.mail_form.zone_email.value.indexOf("@",1) // there must be one "@" symbol
if (atPos == -1) {
alert('Votre adresse e-mail ne contient pas le signe "@". Veuillez vérifier.')
document.mail_form.zone_email.focus()
return false
}
if (document.mail_form.zone_email.value.indexOf("@",atPos+1) != -1) { // and only one "@" symbol
alert('Il ne doit y avoir qu\'un signe "@". Veuillez vérifier.')
document.mail_form.zone_email.focus()
return false
}
if (periodPos == -1) { // and at least one "." after the "@"
alert('Vous avez oublié le point "." après le signe "@". Veuillez vérifier.')
document.mail_form.zone_email.focus()
return false
}
if (periodPos+3 > document.mail_form.zone_email.value.length) { // must be at least 2 characters after the
alert('Il doit y avoir au moins deux caractères après le signe ".". Veuillez vérifier.')
document.mail_form.zone_email.focus()
return false
}} // Fin de la fonction
</script>
</head>
<style type="text/css">
form
{
text-align:center;
}
</style>
<body>
× Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
× Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.