In my mapping thing I've got an info box to provide image and text details when I hover over a pin. The text is within the simplest possible div:
<div id="info"></div>
Just sometimes, not always, it doesn't work and in the console it says:
Cannot set property innerHTML of null at this line:
document.getElementById('info').innerHTML = "";
Can't see any reason why a basic div is seen as null just sometimes. Can't be that it isn't loaded as elements after it are all visible and I added onload to the body to check it has all loaded. In any case the Bing map API setup where the mouseover addHandler is added only triggers at onload.
Any ideas? Ta.
<div id="info"></div>
Just sometimes, not always, it doesn't work and in the console it says:
Cannot set property innerHTML of null at this line:
document.getElementById('info').innerHTML = "";
Can't see any reason why a basic div is seen as null just sometimes. Can't be that it isn't loaded as elements after it are all visible and I added onload to the body to check it has all loaded. In any case the Bing map API setup where the mouseover addHandler is added only triggers at onload.
Any ideas? Ta.
Comment