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

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