[thelist] javascript detecting if function/var is already defined

Kristof Neirynck k.neirynck at belgacom.net
Thu Nov 27 12:16:48 CST 2003

christof.hoeke at e-7.com wrote:

> i have a problem with a script which depends on a function x() which may be defined or not, depending on the page.
> normally i (at least i think it worked) tried to find out if x is available by checking

if ( window.x ) {
	//x is defined
} else {
	//x isn't defined



More information about the thelist mailing list