Just like @j08691 mentioned in the above comment you should add quotes to getElementById()
:
document.getElementById("changeString").innerHTML = "You have successfully run the report."
________________________^____________^
And to use ==
or ===
in your condition for comparison instead of equal =
that used for assignment:
if (bananas === true){
And it will work as you could see below.
Hope this helps.
document.addEventListener("DOMContentLoaded", function(event) {
var bananas = true;
if (bananas === true){
document.getElementById("changeString").innerHTML = "You have successfully run the report."
}
});
<div class="cell text-center" id="changeString"> Report has not yet been pulled for this organization.</div>