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

liorean liorean at f2o.org
Thu Nov 27 12:45:27 CST 2003


christof.hoeke at e-7.com wrote:
Let s modify your code oh-so-little
> 	if (typeof x == "undefined") 
> 		//do something other, maybe calling function y but not x
> 	else 
> 		//do something with x, e.g. call it

-- 
liorean <mailto:liorean at user.bip.net>

ViewStyles, ViewScripts, ToggleStyles and GraphicsInfo bookmarklets and 
Theme Switcher, Cookies Handler scripts:
<http://liorean.web-graphics.com/>



More information about the thelist mailing list