Sur le site d’une grande banque…

Dec 9, 2009

Avatar of Olivier Girardot
Olivier Girardot

voilà ce qu'on pourrait trouver, alors qu'on essaye sans succès sur une page Web de changer son mot de passe :

text
<script language="javascript">
function ifEnterIsPressed() {
    if (window.event.keyCode==13) {
        submitTheForm();
    }
}

function submitTheForm() {
    if ( (document.theform.password0.value.length >= 10) && (document.theform.password1.value.length >= 10) && (document.theform.password2.value.length >= 10) && (document.theform.password0.value.length <= 20) && (document.theform.password1.value.length <= 20) && (document.theform.password2.value.length <= 20) ) {
        document.theform.submit();
    }
    else {
        alert("Au moins un champs obligatoire est vide ou erroné.");
    }
}

</script>

Dans le style message d'erreur super-pas clair, où sans regarder le code j'aurai pas réussi à valider mon nouveau mot de passe, je trouve ça pas mal...

Menu

Follow

Copyright © 2026
 Olivier Girardot's Ramblings
  Powered by   Writizzy