I was having the same problem... to fix this i used:

gmap.updateInfoWindow(Tabs,onServiceTabOpenUpdate);

    onServiceTabOpenUpdate: function () {
 
gmap.getInfoWindow().selectTab(gmap.getInfoWindow().getTabs().length -
1);
    }


apparently calling:
gmap.getInfoWindow().selectTab(gmap.getInfoWindow().getTabs().length -
1);

right after:
gmap.updateInfoWindow(Tabs,onServiceTabOpenUpdate);

did not give it enough time. You need to use an onupdate event
function.

Cheers,
Carlos.



On Feb 3, 7:34 am, Moli <[email protected]> wrote:
> I don't now how to get a working ajax tabs.
>
> I have markers, and a global marker pointer. I need to load content to
> tab when a tab is clicked. Now I only need two tabs, but is preferable
> a generic solution.
>
> Now I have a infowindow loaded with ajax, working  well.
>
> I have read other post with the third parameter( onclick) of
> InfoWindowTab... but doesn't work well...
>
> Here is my approach... but don't work as expected...
>
> function tabChange(a,b){
>         map.getInfoWindow().selectTab(1);
>         //do an ajax to load content
>         $('#infowindowHistory').load(url);
>
> }
>
> var tab1 = new GInfoWindowTab('Info', '<div id="infowindow"><img
> src="img/spinner.gif"/>Loading...</div>');
> var tab2 = new GInfoWindowTab('History', '<div
> id="infowindowHistory"><img src="img/spinner.gif"/>Loading...</div>',
> tabChange);
> var infoTabs = [tab1,tab2];
> map.openInfoWindowTabsHtml(marker.getLatLng(), infoTabs, {maxWidth:
> 388});
>
> Any solution?
>
> Many thanks!
> Jose

-- 
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.

Reply via email to