The API effectively performs
        infoWindow.innerHTML = "Whatever you pass it"
If there are <script> tags inside what you pass it, they will be
ignored.

You need to place your script in the main body of your code, and have it
act on a named element that you place in the infowindow. Something like
this (untested):

var slide = 1;
var maxslide = 15;
var timer;
var next;

GEvent.addListener(marker,"click",function() {
  marker.openInfoWindowHtml('<img src="slide0.jpg" height="300"
        width="200" id="slideshow" >');
  timer = setInterval("animate()", 5000);
}

GEvent.addListener(map, "infowindowbeforeclose", function() {
  if (timer) {
    clearInterval(timer);
    timer = 0;
  }
});

function animate() {
  document.getElementById("slideshow").src = "slide" + next + ".jpg";
  next += 1;
  if (next > maxslide) {next = 0;}
}

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


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