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

  1. function pwfeld()
  2. {
  3.     if (document.formular.T5.value != '')
  4.         document.formular.T3.value = parent.header.document.dummy.feld.value;
  5. }
  6.  
  7. /**/
  8.  
  9. function send()
  10. {
  11.     if (pruefen() == true)
  12.         document.formular.submit();
  13. }
  14.  
  15. /**/
  16.  
  17. function pruefen()
  18. {
  19.     var f1 = document.formular.T1.value;
  20.     var f4 = document.formular.T4.value;
  21.     var f6 = document.formular.T6.value;
  22.     var fe = new Array('T6', 'T5', 'T3', 'T1');
  23.     var va = new Array('\'', '"', ',', '*', '?');
  24.  
  25.     for (i = 0; i < fe.length; i++)
  26.     {
  27.         for (j = 0; j < va.length; j++)
  28.         {
  29.             var ei = document.formular.elements[fe[i]];
  30.  
  31.             if (ei.value.indexOf(va[j]) != -1)
  32.             {
  33.                 alert(txt[5][7] + va[j] + txt[5][8]);
  34.                 ei.select();
  35.                 ei.focus();
  36.                 return false;
  37.             }
  38.         }
  39.     }
  40.  
  41.     if (f6 == '')
  42.     {
  43.         alert(txt[19][9] + txt[34][0] + txt[52][6]);
  44.         document.formular.T6.select();
  45.         document.formular.T6.focus();
  46.         return false;
  47.     }
  48.  
  49.     if (f1 == '')
  50.     {
  51.         alert(txt[19][9] + txt[34][11] + txt[52][7]);
  52.         document.formular.T1.select();
  53.         document.formular.T1.focus();
  54.         return false;
  55.     }
  56.  
  57.     if ((f4.match(/\D/) != null) || (f4 < 50) || (f4 > 1000))
  58.     {
  59.         alert(txt[19][9] + txt[52][4] + ' "\t\n' + txt[52][8]);
  60.         document.formular.T4.select();
  61.         document.formular.T4.focus();
  62.         return false;
  63.     }
  64.  
  65.     return true;
  66. }