Actually typeof is an operator, not a function, so it is generally used the
way Dave described.
-----Original Message-----
From: Patricia Lee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 11:51 AM
To: CF-Talk
Subject: RE: Javascript IsDefined
The correct syntax is
if (typeof(myvarname) == "undefined") {
[do your stuff]
}
|-----Original Message-----
|From: Hayes, David [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, March 13, 2001 10:32 AM
|To: CF-Talk
|Subject: RE: Javascript IsDefined
|
|
|You can use the "typeof" operator.
|
|if (typeof myVarName == "undefined"){
|
|}
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists