[Javascript] DOM navigation
Gee, David
dgee at freemarkets.com
Thu Jun 3 08:23:31 CDT 2004
-----Original Message-----
From: Paul Novitski [mailto:paul at novitskisoftware.com]
Sure. I'm curious: in your work, do you use try/catch blocks in place
of
testing DOM functionality as you go? E.g.:
if (document.getElementById) oDiv =
document.getElementById("myDiv")
I don't use try/catch a whole lot because I feel more in control if I
test
each step as I go along, but I'd be very interested to hear testimonials
praising its virtues or cursing its foibles.
-----End Original Message-----
What I generally do, time permitting, is debug on a step-by-step process
as I'm trying to get the script to work. Once I'm done, and the format
is tied down, I compact all the references that "should always be there"
and wrap it in a try/catch block.
David
More information about the Javascript
mailing list