Home › Forums › JavaScript › [Solved] Trouble Using Variable in GetElementById › Reply To: [Solved] Trouble Using Variable in GetElementById
September 30, 2016 at 3:15 pm
#246061
Alex Zaworski
Participant
It’s hard to say without being able to play around with it. It looks like what might be happening is since you’re not creating a new variable inside the MakeInfoWindow
function you end up modifying a global infobox
each time the function is run.
Try changing it to var infobox = new InfoBox
instead of just infobox = new InfoBox
, maybe?