Not necessarily. It should be used when you want to make sure the value AND the object type both match.
On Oct 5, 2011, at 2:36 PM, "Rick Faircloth" <r...@whitestonemedia.com> wrote: > > I'm not entirely sure about the "===" operator, but it's working. > My understanding from what I've read is that the "===" operator > should be used only when comparing strings. Is that not correct? > > > -----Original Message----- > From: Dave Watts [mailto:dwa...@figleaf.com] > Sent: Wednesday, October 05, 2011 1:39 PM > To: cf-talk > Subject: Re: Shouldn't these statements work? > > >> if ( activeLinkID === 'search_properties' && currentPage === 'index.cfm' > > As everyone's already mentioned, this comparison operator is not an > equality operator. It's an identity operator - it's used to see if two > object references point to the same object. A literal string won't > work here, as it's not the same object as the object to which you're > comparing it. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on > GSA Schedule, and provides the highest caliber vendor-authorized > instruction at our training centers, online, or onsit > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347949 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm