Wondering why I can\'t get document.getElementById(\"my_div\").innerHTML to update the DOM when I re-assign the variable. For example:
var myDivValue = document.getElementById("my_div").innerHTML;
stores the value of innerHTML, innerHTML contains a string value, not an object. So no reference to the elem is possible. You must to store directly the object to modify its properties.
var myDiVElem = document.getElementById("my_div");
myDiVElem.innerHTML = 'Hello'; // this makes the change