[Javascript] Check if an element exists in the DOM

Simone Fumagalli simone at tomato.it
Wed Oct 18 08:02:52 CDT 2006


David Dorward wrote:
> On Wed, Oct 18, 2006 at 02:49:59PM +0200, Simone Fumagalli wrote:
> if (document.getElementById('XYZ')){ ... }

Yes, this works.
But I would like to use the prototype's syntax $('objID')

Is this possible ?

Simone




More information about the Javascript mailing list