[Javascript] I can test for undefined...using typeof or === or == please help

Ben Curtis Quixote at LaMancha.org
Fri Aug 10 20:49:07 CDT 2001


> none of these if statements catch the undefined
 ... 
>   if(typeof mydropdown.options[0].value != undefined ||
mydropdown.options[0].value != "unde" )
>    {
>     myvalue1 = mydropdown.options[0].value;
>    }

How are you defining mydropdown? Is there a page we can see? Here's what I
would look for: the select tag and event handler, the call to the function,
and the function definition. My guess is that this object isn't getting
defined right.

--
+Ben Curtis
...keeping carpal tunnel at arm's length.










More information about the Javascript mailing list