Ah, O.k. I tried out the anonymous function and it blew up again. However! When I did it and attached something simple like:
newDirButton.onclick = function(){alert("foo");};
It works as expected. The new button will open a popup with the word "foo" in it. So, it seems to have a problem with the function that its attaching. I think its caused by the
parameters to the function. More specifically, with the
this.parentNode.parentNote parameter.
So....in other words....I may have to try and re-write the function so that the node that should be passed by the
this.parentNode.parentNode is somehow done within the method instead of being passed....or something along those lines....aw, crap....