The document
object has a collection of all of the forms on the page, and you can access them by name, which is why document.myForm
works. But this does not apply to all elements on the page -- forms are special.
To access your div by id, you can use
document.getElementById("tree")
so your code would become
document.getElementById("tree").innerHTML = document.getElementById("tree").innerHTML + ajaxRequest.responseText;