Hello this might be a stupid question but what is the point in the document.GetElementById function when you can just select the element like so:
<html><body>
<p id="sampletext">I am the sample</p>
<script>
sampletext.innerHTML="I have just been changed" //This changes the inner HTML
</script>
</body></html>
Please let me know if I'm missing something really obvious. Thanks.