home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 July / PCpro_2005_07.ISO / files / internet / JanaServer / JanaSetup.exe / admin / pruefen_js / user_rights.js < prev    next >
Encoding:
Text File  |  2005-02-19  |  2.1 KB  |  127 lines

  1. function leeren()
  2. {
  3.     document.formular.edit.value = '';
  4.     document.formular.Item.value = '';
  5. }
  6.  
  7. /**/
  8.  
  9. function feld_disabled()
  10. {
  11.     with (document.formular)
  12.     {
  13.         var c1 = C1.checked;
  14.  
  15.         if (c1 == true)
  16.         {
  17.             T1.disabled = false;
  18.             D1.disabled = false;
  19.         }
  20.         else
  21.         {
  22.             T1.disabled = true;
  23.             D1.disabled = true;
  24.         }
  25.     }
  26. }
  27.  
  28. /**/
  29.  
  30. function Abfrage(edi, use)
  31. {
  32.     var Check = confirm(txt[20][31]);
  33.  
  34.     with (document.formular)
  35.     {
  36.         if ((Check == true) && (pruefen() == true))
  37.         {
  38.             var c1 = C1.checked;
  39.  
  40.             T1.disabled = ((c1 == true) || (T1.value == '')) ? false : true;
  41.             D1.disabled = false;
  42.  
  43.             edit.value = '' + edi + '';
  44.             Item.value = '' + use + '';
  45.  
  46.             submit();
  47.         }
  48.         else
  49.         {
  50.             edit.value = '';
  51.             Item.value = '';
  52.         }
  53.     }
  54. }
  55.  
  56. /**/
  57.  
  58. function edit(edi, use)
  59. {
  60.     if (pruefen() == true)
  61.     {
  62.         with (document.formular)
  63.         {
  64.             var c1 = C1.checked;
  65.  
  66.             T1.disabled = ((c1 == true) || (T1.value == '')) ? false : true;
  67.             D1.disabled = false;
  68.  
  69.             edit.value = '' + edi + '';
  70.             Item.value = '' + use + '';
  71.  
  72.             submit();
  73.         }
  74.     }
  75. }
  76.  
  77. /**/
  78.  
  79. function send()
  80. {
  81.     if (pruefen() == true)
  82.     {
  83.         with (document.formular)
  84.         {
  85.             var c1 = C1.checked;
  86.  
  87.             T1.disabled = ((c1 == true) || (T1.value == '')) ? false : true;
  88.             D1.disabled = false;
  89.  
  90.             submit();
  91.         }
  92.     }
  93. }
  94.  
  95. /**/
  96.  
  97. function pruefen()
  98. {
  99.     var c1 = document.formular.C1.checked;
  100.  
  101.     if (c1 == true)
  102.     {
  103.         var f1 = document.formular.T1.value;
  104.         var d1 = document.formular.D1;
  105.  
  106.         if ((f1 == '') || (f1.match(/\D/) != null) || (f1 < 0) || (f1 > 86400))
  107.         {
  108.             alert(txt[19][9] + txt[26][8]);
  109.             document.formular.edit.value = '';
  110.             document.formular.Item.value = '';
  111.             document.formular.T1.select();
  112.             document.formular.T1.focus();
  113.             return false;
  114.         }
  115.  
  116.         if ((d1.options[0].selected == false) && (d1.options[1].selected == false) && (d1.options[2].selected == false))
  117.         {
  118.             alert(txt[26][13]);
  119.             document.formular.edit.value = '';
  120.             document.formular.Item.value = '';
  121.             document.formular.D1.focus();
  122.             return false;
  123.         }
  124.     }
  125.  
  126.     return true;
  127. }