I use an tabbed infowindow to add infos to a database.
When the infowindow displays first, everything works fine.
The second infowindow shows only the tabs, but without my form.
The infowindows are creted by this way:
<code>
infowindow = new google.maps.InfoWindow({content: contentString});
//Add listener to map, to insert new Marker
google.maps.event.addListener(map, "click", function(event) {
marker = new google.maps.Marker({
position: event.latLng,
map: map,
draggable: true
});
map.setCenter(event.latLng);
map.setZoom(17);
google.maps.event.addListener(infowindow, 'domready', function() {
addTabbar();
});
</code>
where the addTabbar-function looks like this, where tab1, tab2 and
tab3 are the id's of the div's with the forms:
<code>
function addTabbar() {
tabbar=new dhtmlXTabBar("tabbar","top");
tabbar.setImagePath("./dhtmlx/imgs/");
tabbar.addTab("b1","Sorte","100px");
tabbar.addTab("b2","Zustand","100px");
tabbar.addTab("b3","Pflanzung","100px");
tabbar.setContent("b1","tab1");
tabbar.setContent("b2","tab2");
tabbar.setContent("b3","tab3");
tabbar.setTabActive('b1');
}
</code>
After the form is filled in the data is saved via saveData() to the
database and on success the infowindow is closed.
<code>
if (responseCode == 200 && data.length <= 1) {
alert("Baum in der Datenbank gespeichert.");
infowindow.close();
marker.setDraggable(false);
</code>
But it seems that the infowindow still persists so that the next
infowindow cannot create the divs with the same id's.
Is there a way to reinitiate the infowindows so that the second, and
third one will behave like the first one created?
Georges
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.