home *** CD-ROM | disk | FTP | other *** search
/ Beweegwijzer / beweegwijzer.iso / setup / _SETUP.1 / ActDeleteBtn.htc < prev    next >
Encoding:
Text File  |  2000-04-27  |  1.4 KB  |  45 lines

  1. <PUBLIC:ATTACH EVENT="onclick"  HANDLER="Delete" />
  2.  
  3. <script language="JavaScript">
  4. function Delete() {
  5.   bladItems = parent.userRoot.selectSingleNode("data/planweek[@num = '"+weekNum+"']/dag[@naam = '"+chosenDag+"']/act[@num = '"+chosenTab+"']");
  6.   
  7.   for (var i=0; i<bladItems.childNodes.length; i++) {
  8.     if (bladItems.childNodes[i].text == element.ref) {
  9.       bladItems.removeChild(bladItems.childNodes(i));
  10.       }
  11.     }
  12.     
  13.   parent.xmlUserData.save(parent.userDataFileName);
  14.   
  15.   tot = makeBlad();
  16.   ResultBox[chosenTab].innerText = tot;
  17.   t = parseFloat(ResultBox[0].innerText)+parseFloat(ResultBox[1].innerText)+parseFloat(ResultBox[2].innerText)+parseFloat(ResultBox[3].innerText)+parseFloat(ResultBox[4].innerText);
  18.   DagBox[chosenDagNum].innerText = Math.round(t);
  19.  
  20.   if (t<norm) {
  21.     DagBox[chosenDagNum].className = 'dagBoxRed';
  22.     result = 'r';
  23.     }
  24.   else if (t>=norm) {
  25.     DagBox[chosenDagNum].className = 'dagBoxGreen';
  26.     result = 'g';
  27.     }
  28.     
  29.   if (DagBox[chosenDagNum].innerText != '0') {
  30.     CopyPasteBtn[0].style.visibility = 'inherit';
  31.     CopyPaste.style.visibility = 'inherit';
  32.     }
  33.   else CopyPaste.style.visibility = 'hidden';
  34.   
  35.   if (cpweek != -1) {
  36.     CopyPasteBtn[1].style.visibility = 'inherit';
  37.     CopyPaste.style.visibility = 'inherit';  
  38.     } 
  39.     
  40.   putResultInDag(tot,t,result);  
  41.   
  42.   getTab();
  43.   }
  44. </script>
  45.