JavaScript Debug Evaluator
by Nicola Zordan
Friday 9 March 2000

What is the JavaScript Debug Evaluator:
It is a simple JavaScript source you can include in you page that allows you to inspect and test JavaScript commands on your page.
Often it happens that object names or JavaScript operation result in errors and debigging it is a pain if you only look at the source and cannot access live the objects in the page.
This will allow you to inspect real time all the objects in your page by simply allowing you to evaluate JavaScript expressions and functions.

How to put it to work:
You should upload this little JavaScriptDebug.js in your site, or if you are working on your local drive jut put it on your folder (it does not really need to be in the current folder, jut be accessible).
Then you have to add this script to your page to that the Debug button will show up.

Instructions:

  1. Extract the zip to a directory , and copy JavaScriptDebug.js in your web site
  2. Open the web page you want to debug yourpage.htm (.htm or .html or .asp, ...) with the notepad or the webeditor of your choice
  3. Insert the reference to the script in your page
    In notepad you can type:
    <SCRIPT LANGUAGE=JavaScript SRC="JavaScriptDebug.js">
    In FrontPage Express for example you can
    go to the desired location on the page, select from the menu
    Insert, Script
    select JavaScript
    do not type anything on the Script text
    press the Extended... button
    press Add button
    on Name type
    SRC
    on value type
    JavaScriptDebug.js
    press OK then OK then OK
  4. Save the file
  5. Upload your page if you need
  6. Open it in a browser, you will notice the button [Debug] where you inserted the script reference
  7. Press the button, a prompt requiring to type the JavaScript expression you want to execute
  8. Press OK and see the result (if you press cancel you will not execute the expression)

Example:

Press the Debug button that should display at point 6. of the instructions

Please let me know if you like it and visit my web site

Nicola Zordan
Nicola.Zordan@bigfoot.com
http://www.NicolaZordan.com
http://ZordanNicola.n3.net