"Michael Winter" <> wrote in message news

psfl01bhnx13kvk@atlantis...
> On Sat, 09 Oct 2004 14:50:32 GMT, George Hester <>
> wrote:
>
> [snip]
>
> >> Assuming I understand you correctly, that isn't a valid reason to use
> >> try..catch. Assuming you can't generate code that is relevant to the
> >> generated mark-up, test. If the element doesn't exist, you won't get a
> >> valid object reference. You simply need to test for that and act
> >> [accordingly.]
> >
> > the test is try() the act accordingly is catch(e){}
>
> [snip]
>
> > What's the problem with that?
>
> It's unnecessary?
>
> If you have an object reference,
>
> if(objRef) {
>
> will check if it's non-null. If at the time of that test, objRef
> references one DIV that doesn't exist, the reference will be null and the
> expression will evaluate as false.
>
> Mike
>
> --
> Michael Winter
> Replace ".invalid" with ".uk" to reply by e-mail.
six of one 1/2 dozen of the other
I never said it was necessary just sufficient for browsers which support it.
George Hester
__________________________________