home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Seeker / seekers_spy.txt < prev    next >
Text File  |  2000-05-25  |  5KB  |  163 lines

  1. // seekers_spy.js
  2. // Seeker's javascript 'debugger'  ;)
  3. // Version 1.2
  4. // 31.05.1999
  5. // part ONE of my javascript-debugging-tools-library
  6. //****************************************+
  7. // feel free to use it (but leave my name, s'il vous plait 
  8. // should you have some intersting additions :
  9. // please mail them to : The_Seeker@gmx.net - Thanx in advance
  10. //*********
  11. // HISTORY
  12. // V.1.2 - 30.05.99
  13. //  added function Show_Win_Part_HTML (label, message)
  14. // just because I needed it for Fravia's 3rd javascript-entrance
  15. // sorry for the spaces, but got no other solution til now
  16. // V.1.1 - 25.05.99
  17. // I disliked showing the debug in a form 
  18. // so I cut the next 3 functions out in version 1.1
  19. //function Form_Show (message)
  20. //function Form_Show_LF (message)
  21. //function Form_Show_Clear ()
  22. //**********
  23. //function Show_Win (label, message)          use it like an alert-box
  24. //                                            label   == your text-explanation
  25. //                                              message == the value you like to watch
  26. //function Show_Win_LF (label, message)       same as above, 
  27. //                                            with linefeed 
  28. //function Show_Win_Part_HTML (label, message) useful if you have to print some PART
  29. //                                               of a HTML-Code
  30. //                                               for example :
  31. <!--                                               <center><Table border=1><TR><td><Font size=+3>D   -->
  32. //function Show_Win_LF_Func (label, message)  same as Show_Win_LF
  33. //                                            + shows the actual function-name
  34. //function Show_Win_Skip ()                   just a linefeed 
  35. //function Show_Win_Dummy ()                  just some empty space
  36. //                                             to continue with your output in the same line  
  37. // function teatime ()                        ;)
  38. //function Show_Win_Close()                   guess :)
  39. // use The Spy with this code at the beginning of your program : 
  40. // <SCRIPT LANGUAGE="JavaScript" SRC="seekers_spy.js"></SCRIPT>
  41. // YES, correct, the following code could be shortened - but in THIS way it should be easier to understand
  42. // hope so ;)
  43.  
  44.  
  45. var Win_Show;
  46.  
  47. function Show_Win (label, message)
  48.  {
  49.   Win_Show = window.open('', 'Spy','toolbar=no,scrollbars=yes,width=600,height=400,resizable=yes');
  50.   if (Win_Show != null)
  51.     {
  52.      if (Win_Show.opener == null)
  53.         Win_Show.opener = self;
  54.      }
  55.     
  56.  if (Win_Show == null)
  57.         alert ("Problem creating window, restart your browser");
  58.  
  59. if(message != null)
  60.    {
  61.         Win_Show.document.write(label + ' = ' + message);
  62.    }
  63. }
  64.  
  65. function Show_Win_LF (label, message)
  66.  {
  67.   Win_Show = window.open('', 'Spy','toolbar=no,scrollbars=yes,width=600,height=400,resizable=yes');
  68.   if (Win_Show != null)
  69.    {
  70.     if (Win_Show.opener == null)
  71.      Win_Show.opener = self;
  72.   }
  73.   if (Win_Show == null)
  74.         alert("Problem creating window, restart your browser");
  75.     
  76.   if(message != null)
  77.     {
  78.      Win_Show.document.write(label + " = " + message+"<DT>");
  79.     }
  80. }
  81.  
  82. function Show_Win_Part_HTML (label, message)
  83.  {
  84.   Win_Show = window.open('', 'Spy','toolbar=no,scrollbars=yes,width=600,height=400,resizable=yes');
  85.   if (Win_Show != null)
  86.    {
  87.     if (Win_Show.opener == null)
  88.      Win_Show.opener = self;
  89.   }
  90.   if (Win_Show == null)
  91.         alert("Problem creating window, restart your browser");
  92.     
  93.   if(message != null)
  94.     { 
  95.      var len=message.length
  96.      Win_Show.document.write (label + " = ")
  97.      for (i=0; i<len; i++)
  98.               Win_Show.document.writeln(message.charAt(i));
  99.     }
  100. }
  101.  
  102.  
  103. function Show_Win_LF_Func (label, message)
  104.  {
  105.   Win_Show = window.open('', 'Spy','toolbar=no,scrollbars=yes,width=600,height=400,resizable=yes');
  106.   if (Win_Show != null)
  107.    {
  108.     if (Win_Show.opener == null)
  109.      Win_Show.opener = self;
  110.   }
  111.   if (Win_Show == null)
  112.         alert("Problem creating window, restart your browser");
  113.     
  114.   if(message != null)
  115.     {
  116.      var funcName = Show_Win_LF_Func.caller.toString();
  117.      funcName = funcName.substring(10, funcName.indexOf(")") +1)
  118.      
  119.      Win_Show.document.write("function " + funcName + " : " + label + " = " + message+"<DT>");
  120.     }
  121. }
  122.  
  123. function Show_Win_Skip ()
  124.  {
  125.   Win_Show = window.open('', 'Spy','toolbar=no,scrollbars=yes,width=600,height=400,resizable=yes');
  126.   if (Win_Show != null)
  127.    {
  128.     if (Win_Show.opener == null)
  129.      Win_Show.opener = self;
  130.    }
  131.   if (Win_Show == null)
  132.         alert("Problem creating window, restart your browser");
  133.     
  134.     Win_Show.document.write("<BR>");
  135.  }
  136.  
  137. function Show_Win_Dummy ()
  138.  {
  139.   Win_Show = window.open('', 'Spy','toolbar=no,scrollbars=yes,width=600,height=400,resizable=yes');
  140.   if (Win_Show != null)
  141.    {
  142.     if (Win_Show.opener == null)
  143.      Win_Show.opener = self;
  144.    }
  145.   if (Win_Show == null)
  146.         alert("Problem creating window, restart your browser");
  147.     
  148.     Win_Show.document.write("_____");
  149.   }
  150.  
  151.  
  152. function teatime()
  153.  { 
  154.     alert ("let's have a break");
  155.  } 
  156.  
  157. function Show_Win_Close()
  158.  {    
  159.   Win_Show.focus();
  160.   Win_Show.document.close();
  161. }
  162.  
  163.