Hi all.
My problem is: when I call openInfoWindowHtml() first time after page
loaded I can't access html elemns in it via getElementByID
but all next calls are OK and my script can access html elements
inside appeared 'infoWindows'
How it is imlemented - parts of code below.
Ex:
GEvent.addListener(marker, 'click',
function() {
getMarkerNoByLatLng(marker.getLatLng());
marker.openInfoWindowHtml(infoWinHtml);
loadMarkerInfoWindowData();
}
);
.....
var infoWinHtml = <textarea class="infoWindowTextArea"
name="infoWindowHtml" id="infoWindowHtml" onchange="saveInfoWin(this)"
cols="80" rows="4"></textarea>';
.......
function loadMarkerInfoWindowData(){
document.getElementById('infoWindowHtml').value = 'SomeValue';
}
---------------------------------------
What is strange I'm sure this was working fine some time ago. And I
noticed this error recently. Being trying to fix it it half of the
night but no luck.
Algorithm of getting this error:
I have several markers which are loaded onto map from server.
Page reloaded
Click on any marker - got javascript error:
[document.getElementById("infoWindowHtml") is null]
Click once again on the same marker - no more error. Click on any
other markers - works fine "infoWindowHtml" element receives new
value.
Behaviour is the same in IE 6,7 and FF3
If anyone can give some idea what is it - that could be great!!!
Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---