> Therefore it is not possible to call a html Site in an Tab but in an
> infowindow it works ?

It's possible,but you need to do things in the right order.

GDownloadUrl is asynchronous
  http://econym.org.uk/gmap/async.htm

Looking at your code
      GEvent.addListener(marker, "click", function() {
                  GDownloadUrl(tab1, function(html,responseCode) {
            content1 = html;}
            .....
          marker.openInfoWindowTabsHtml([new GInfoWindowTab(...

An anonymous function is defined to be executed on marker click, so
far so good.
When clicked and executed, GDownloadUrl() is called.  This fires off a
request for the data - that's all.  The data will take ages to come
back, in javascript terms.
Meantime the code doesn't stop, it carries on.
Eventually it gets to the openInfoWindowTabsHtml(), but the data still
isn't available so broken tabs are created.
Ages later, the data appears at the browser, the download callback is
executed, and the variable 'content1' is set.
Nothing else happens with 'content1',  because the open infowindow
business finished (badly) long ago.

You can only use asynchronous data after it is available.  You don't
know when it will be available, so you have to use the 'callback'
function which is automatically run when the data really is available.

Skeleton code
 GEvent.addListener(marker, "click", function() {
                  GDownloadUrl(tab1, function(html,responseCode) {
                            content1 = html;
                            marker.openInfoWindowTabsHtml( use content
here)
                   } // end of callback
          } //end of click listener

The difficulty that you will face is that you need to get multiple
asynchronous calls to assemble _all_ your data, before opening the
infowindow.

An alternative approach that might work better is to open your tabbed
infowindow at the click, but populate it with some dummy data.   Fire
off your GDownloadUrls and set each ones callback up to update the
dummy data in the existing tabs into the real data, as it becomes
available.

This stuff isn't easy.

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