I have 3? 5? files with lumps of java tracing code in. THIS IS THE INDEX / DIRECTORY to my trace files. (My "testjava.html" also has useful tracing functions in it, but only for DOM stuff.) There are three writing methods: 1) alert(); / pops up a window, done by Java 2) Edit DOM tree: reserve a place on the web page by pre-putting an HTML area for this, and java inserts a string: see file 'trace1', function trace1() [and mystudents.php] 3) Open new window and do writeln: see file 'trace3' [and DOMtrace] ==== TRACE0 General advice on tracing tactics; and: Catch java errors [flagerror() / onerror()], so you don't miss their existence. One-liner kind of stuff: java snippets to copy into body of java, to get tracing output. E.g. how to print out stuff. Lumps to be assimilated elsewhere. ==== TRACE1 My basic routine for inserting errmsgs into a prepared bit of a browser page. ==== TRACE2 Printing info about a given object, either java object or DOM object. Typically insert a suitable "onclick", and pass "this". It uses the trace1 method for output, though could easily do alert(). function prnodeJava(node) { alert(myprnode(node)); }; function prnodeJava2(node) { trace(myprnode(node)); }; // Prints short info on the node, or any Java object, given it. // and calls prnodeShort if DOM object function prnodeShort(node) { trace(myprnodeshort(node) + '\n'); } Brief info on one DOM node: a bit more than 'prnodeJava' e.g. name-value, id, name, form. function prnodeMed(node) { trace(myprnodemedium(node) + '\n'); } Ditto, but gives the brief info on each of: self, parent, children. function prnodeSubtree(node) { printDOMtree(node,null, ==== TRACE3 DOM tree printing; to a new window it creates. function prnodeSubtree(node) { printDOMtree(node,null,0); }; // Prints subtree in a new window. function prnodeFull(node) { printDOMtree(node, null, 1); } Prints ALL fields of one node-object in a new window. Good for when you want the name of a field in these objects. function supertrace(obj) { // Opens a window and does a 4 part inspection of the object: a) java type b) short summary of DOM props c) Subtree from object's parent downwards d) Full all-field print of objects' fields.