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

Jeff Howden jeff at jeffhowden.com
Mon Sep 22 15:03:11 CDT 2003


sarah,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Sarah
> 
> 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') //...
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

is this client-side or server-side?

either way, what does Request.QueryString('id') return?

.jeff

------------------------------------------------------
Jeff Howden - Web Application Specialist
Resume - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/





More information about the thelist mailing list