Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript [Solved] Trouble Using Variable in GetElementById Reply To: [Solved] Trouble Using Variable in GetElementById

#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?