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. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202819 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54