I'm trying out a script called mktree.js
< http://www.mattkruse.com/javascript/mktree/ >
I want to add an expand all button to the script, using the DOM
insertBefore method. I added a function to the mktree.js script, but
it failed to insert the button I created. However, Firefox's javscript
console did not report an error. AFAICS, it didn't find the element
with id="root".
I made a second page, this time putting the script to insert the
button inside the page itself, and it worked. I'm confused why the
funtion fails in the external js file, not inside the html document.
The test cases can be found here:
< http://www.tsmchughs.com/test/insert/ >
--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/