home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / JanaSetup.exe / admin / pruefen_js / pass.js < prev    next >
Encoding:
Text File  |  2006-05-08  |  971 b   |  54 lines

  1. if ((isNaN(min_laenge) == true) || (min_laenge < 4) || (min_laenge > 20))
  2.     min_laenge = 4;
  3.  
  4. /**/
  5.  
  6. function send()
  7. {
  8.     if (pruefen() == true)
  9.         document.formular.submit();
  10. }
  11.  
  12. /**/
  13.  
  14. function pruefen()
  15. {
  16.     var f3 = document.formular.T3.value;
  17.     var f4 = document.formular.T4.value;
  18.     var fe = new Array('T3', 'T4');
  19.     var va = new Array('\'', '"', ',');
  20.  
  21.     for (i = 0; i < fe.length; i++)
  22.     {
  23.         for (j = 0; j < va.length; j++)
  24.         {
  25.             var ei = document.formular.elements[fe[i]];
  26.  
  27.             if (ei.value.indexOf(va[j]) != -1)
  28.             {
  29.                 alert(txt[5][7] + va[j] + txt[5][8]);
  30.                 ei.select();
  31.                 ei.focus();
  32.                 return false;
  33.             }
  34.         }
  35.     }
  36.  
  37.     if (f3.length < min_laenge)
  38.     {
  39.         alert(txt[5][5] + min_laenge + txt[5][9]);
  40.         document.formular.T3.select();
  41.         document.formular.T3.focus();
  42.         return false;
  43.     }
  44.  
  45.     if (f3 != f4)
  46.     {
  47.         alert(txt[5][6]);
  48.         document.formular.T3.select();
  49.         document.formular.T3.focus();
  50.         return false;
  51.     }
  52.  
  53.     return true;
  54. }