Checking for null? http://www.jsworkshop.com/forum/showthread.php3?threadid=925 Detecting Null Ron Borowicz I know that the following statement is Null and should be: (parent.opener.document.all.idAgFax.childNodes[0].nodeValue). How do I check for null or the absence of null and code around it without getting a Run Time error telling me that it is null or not an object? It's catch-22! I have tried the following and it doesn't work for me: If (parent.opener.document.all.idAgFax.childNodes[0].nodeValue != null) "do something" Thanks! --- Ron, First, it should be "if" not "If". Next, it seems like a check for null doesn't work for two different reasons: 1. it causes an error saying that the object is not defined or null 2. It NEVER causes an error or catches null either. The way I'd get around it is to use: to hold one char place then check for .length > 1, so if there IS a value it will be larger than one char. Hope that helps. (See: help132A.htm & help132B.htm) pk 12/26/2001 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- [Code save as "Startwithme] --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- ---------------------------------------------------------------------
Form 125 (2001/04) Commercial Insurance Application: Agency and Carrier