Undefined of attached Object

Working with 4.2 Pro-Suite (evaluation) I have a layout (3L) with an attached Tree in the “a” cell. The Tree is from an HTML List and is attached using attachObject. To this point everything works well. I have tried to attach an event to the Tree and defined the Tree variable with the attachObject method. When I run my script I get “Cannot read property ‘attachEvent’ of undefined”. I have researched the documentation and forum and tried several options with no luck. Why am I getting this error? Here is my code:

[code] var myLayout, myTree;
function doOnLoad(){
myLayout = new dhtmlXLayoutObject({
parent: document.body,
pattern: “3L”,
cells: [
id: “a”,
text: “Cell A”,
width: 300
id: “b”,
text: “Cell B”
id: “c”,
text: “Cell C”,
collapse: true


		myTree = myLayout.cells("a").attachObject("treeBox");
		myTree.attachEvent("onClick", function(id){
			alert("ID "+id+" was clicked");

I loaded the Tree using an XML file and the attachTree method. Everything works correctly now so, I’m assuming the returned value of the attachObject method is different and causing this problem?

dhtmlxTree-from-HTML has limited functionality. We are always recommend to use xml or json data