'; document.writeln(my_chunk); } } // --> --> Tools Part 1 : The Seekers spy
Javascript Noteblock


Javascript-Tools

Part 1 : The Spy (debugging-tool)

The_Seeker

by The Seeker

(31 May 1999)


Courtesy of The Dark Tower's Javascript-page
~
Well, finally there was enough time to put the tool's-section online !

Tired of using these alert-boxes when you examine some code ? Tired of clicking your mouse to dead ? - Get rid of endless mouse-clickings, just set your points of attention with these new functions in your code (just the way you did your alert-boxes) and watch some window get filled with all the information you ever wanted ! Hey, you can even save this information to disk or make some nice printing !
Here we go ! Have fun ! :-)


How to debug your scripts



bullet Method 1 : The Micro$oft-way
This is rather easy : just put some code together, do not test it (under no circumstances !) and put it on the store. Make your money with it, and when there are enough complaints, sell them a 'sevice-pack' or - even better - a new version with some new bugs.


bullet Method 2 : Use Netscape's debugger
Hmmm .. lot of stuff ! Or, as the Germans would say : 'mit Kanonen auf Spatzen schiessen'.
Not my turn. Just a little bit too much.


bullet Method 3 : Use some alert boxes
That's the way we do it all, don't we ? Spreading our alert boxes around the code, get the information, write it on a piece of paper, click your mouse ..
And so you click and click and .....STOP ! These days are gone. Give your mouse some break. Take this :


bullet Method 3 : Use The Seeker's Spy
You can use this little tool just the way you used to use your alert-boxes. BUT you will get all of your wanted information collected in ONE window - which you can save, copy-and-paste or print. Nice, isn't it ?

How to use it : (rather easy)
- Grab the script with the button above and rename it from seekers_spy.txt to seekers_spy.js.
- Put this code at the beginning of the file you want to examine :
    <SCRIPT LANGUAGE="JavaScript" SRC="seekers_spy.js">

- You can use these functions :
Function Explanation
 function Show_Win (label, message)  use it like an alert-box
   label == your text-explanation
   message == the value you like to watch
 function Show_Win_LF (label, message)  same as above, + with linefeed
 function Show_Win_Part_HTML (label, message)  useful if you have to print some PART of a HTML-Code
for example :
<center><Table border=1><TR><td><Font size=+3>D

sorry for the spaces between the chars, could not solve this yet ! :-(
 function Show_Win_LF_Func (label, message)  same as Show_Win_LF
+ shows the actual function-name
 function Show_Win_Skip ()  linefeed only
 function Show_Win_Dummy ()  just some empty space ('___')
  to continue with your output in the same line
 function teatime ()   :-))
 function Show_Win_Close()  finish your work


Easy to use, I think. (Hope so)
Well, I had three other functions, using a form for the output instead of a window, but I did not like it. So I cut it out. Should you need this part of the code, so just mail me.

I hope you can need this tool, feel free to use it (but leave my name, s'il vous plait. Should you have some interesting additions : please mail them to me at the usual address. - Thanx in advance



(c) The Seeker 1999. All rights reversed


Page started by The Seeker
Page created: 02nd June 1999


Logo