[thelist] does JavaScript have an equivalent to IsDefined()?

Sarah poohbear at designshift.com
Mon Sep 22 14:52:13 CDT 2003


More ASP/JavaScript woes :) Is there a JavaScript equivalent to the 
ColdFusion IsDefined() function? I would like to be able to test to see if 
a variable is defined in the querystring, but none of the methods I have 
tried has worked. I have tried:
if (Request.QueryString('id') == null) //...
if (Request.QueryString('id') == undefined) //...
if (Request.QueryString('id') == 'undefined') //...
if (typeof Request.QueryString('id') == undefined) //...
if (typeof Request.QueryString('id') == 'undefined') //...

TIA

Sarah



More information about the thelist mailing list