I was learning about appendChild and have so far come up with this code:
appendChild
The script is being run before the page completes loading. Which is why document.getElementById("theBlah") returns null.
Either use something like jQuery or simply something like