Nope actually the former, two references to the same object. I wanted to pass in a reference to an object (in this case a singe li) and then loop over a collection of objects (in this case all the li's in an ul) and do something when the first reference matched the one of the second references.
I got it working once I realized my problem was a syntax issue not related to the actual comparison [you know JavaScript just really hates it when you use CFML syntax in it]. Now it all does as I want it to. -------------- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA "C code. C code run. Run code run. Please!" - Cynthia Dunning ....-----Original Message----- ....From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ....Sent: Thursday, April 14, 2005 11:42 AM ....To: CF-Talk ....Subject: RE: OT JavaScript compare two objects .... ....Ian when you say the same object do you mean 2 references which point to ....the ....same object e.g. .... ....A = 5 .... ....B = A .... ....C = A .... ....Or 2 different objects whose fields match? .... ....In javascript == will return false if 2 references do not point to the ....same ....object, but I suspect you actually want to compare the value of the ....member ....fields of an object? .... ....K .... ....> -----Original Message----- ....> From: Ian Skinner [mailto:[EMAIL PROTECTED] ....> Sent: 14 April 2005 16:19 ....> To: CF-Talk ....> Subject: OT JavaScript compare two objects ....> ....> Is there some way to just compare to objects to see if they are the ....same ....> object without using some property of the objects? ....> ....> For example, in the following markup ....> ....> <ul id="list"> ....> <li>...</li> ....> <li>...</li> ....> <li onclick="jsFunc(this);">...<li> ....> <li>...</li> ....> <li>...</li> ....> </ul> ....> ....> And then something like this in jsFunc ....> ....> Function jsFunc(liObj) ....> { ....> for (i=0;i < document.getElementById("list").childNodes.length; i++) ....> { ....> if liObj == < document.getElementById("list").childNodes[i]; ....> do something with this list item. ....> else ....> Do something with the other list items. ....> } ....> } ....> ....> Is this possible without adding ids or something like that to every li? ....> ....> -------------- ....> Ian Skinner ....> Web Programmer ....> BloodSource ....> www.BloodSource.org ....> Sacramento, CA ....> ....> "C code. C code run. Run code run. Please!" ....> - Cynthia Dunning ....> ....> Confidentiality Notice: This message including any ....> attachments is for the sole use of the intended ....> recipient(s) and may contain confidential and privileged ....> information. Any unauthorized review, use, disclosure or ....> distribution is prohibited. If you are not the ....> intended recipient, please contact the sender and ....> delete any copies of this message. ....> ....> ....> ....> .... .... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202864 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54