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"){
|
|}
|
|-----Original Message-----
|From: Jeanne Sarfaty Glazer [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, March 13, 2001 9:27 AM
|To: CF-Talk
|Subject: Javascript IsDefined
|
|
|Hi Folks,
|
|What is the Javascript equivalent to the Cold Fusion IsDefined 
|function?  
|(or does one even exist?!)
|
|TIA,
|- - - Jeanne
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to