The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I put them at the top of the functions responsible for making the change. Should I use another method than this?
var vname = document.getElementById(“pic”);
vname .src = “pic1.jpg”;
We can’t really say without seeing the whole code and an example of usage. Issue could be a loop, or other elements on the page, or the image itself, if it isn’t optimised.