Add event handler for body.onload by Javascript within part
body.addEventListener(“load”, init(), false); That init() is saying run this function now and assign whatever it returns to the load event. What you want is to assign the reference to the function, not the result. So you need to drop the (). body.addEventListener(“load”, init, false); Also you should be using window.onload and not body.onload addEventListener is … Read more