From: James M. <jam...@ho...> - 2003-08-01 02:32:29
|
This seems really silly, but I'm having trouble getting rid of objects that are children of another object. This is the code: alert("fnChildLoad function: \n" + "oCallingObject=" + oCallingObject +"\n"+ "oCallingObject.length=" + oCallingObject.items.length); for(var i=0; i<oCallingObject.items.length; i++) { //alert(oCallingObject + "\n" + oCallingObject.items[i]); //oCallingObject.deleteChild(oCallingObject.items[i]); //oCallingObject.items[i].deleteFromParent(); //oCallingObject.items[i].del(); } //oCallingObject.deleteAllChildren(); alert("fnChildLoad after delete: \n" + "oCallingObject.length=" + oCallingObject.items.length); And none of these things seem to work. Both oCallingObject & oCallingObject.items[i] (in the alert) are the objects that I expect them to be, but the oCallingObject.items.length value is 14 both before and after the delete I tried. I tried all the ways that seemed reasonable... The weird thing is that even though the objects are still there, something is happening to them because when I am iterating through them again some values are null that wouldn't have been null before (size, etc). Ugh!!! Any suggestions? It's driving me crazy. Thank you, -James _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 |