Yes, thanks! Not waiting for the page to load was the problem however I want the user to click on the "some text here" text and an event handler then causes the text to be changed via getElementsByTagName("td").firstChild.data
The way it stands (see new code below) the text changes to "different text here" before the user sees the original "some text here"
document.getElementsByTagName("td").firstChild.data = "different text here";
<td>some text here</td>