Thanks for the reply. I am trying to do exactly that. Do you know how I can do this?
Derek On Dec 7, 2009, at 11:56 AM, James Thompson wrote: > > Have you tried to see if the element is undefined or null? > > On Mon, Dec 7, 2009 at 2:53 PM, Derek Hedstrom > <[email protected]>wrote: > >> >> Help! >> >> I need to compare the value of an array element to another value, but the >> array element may not always exist. How can I check for this? >> >> I have tried ArrayIsDefined(), and IsDefined(). >> >> ArrayIsDefined() gives me the following error: >> <cfoutput>#ArrayIsDefined(arSelected,3)#</cfoutput> >> Cannot access array element at position 3. >> The array has 2 indexes. Valid positions are from 1 to 2. >> >> Yeah, duh! That's what I am trying to find out! >> >> IsDefined doesn't seem to like array notation: >> <cfoutput>#IsDefined("arSelected[1]")#</cfoutput> >> Parameter 1 of function IsDefined, which is now arSelected[1], must be a >> syntactically valid variable name. >> >> TIA, >> Derek >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4915 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
