Thanks Andrew, but i'm afraid i have a problem then, because the information i have to retrieve contains images, text....
On 19 Feb, 12:48, Andrew Leach <[email protected]> wrote: > On Feb 19, 11:26 am, poles_apart <[email protected]> wrote: > > > > > The problem is that the second openInfoWindowHtml will close the first > > infowindow and then open the new one, leading to an ugly effect of > > close-open. I would like to change the text on the window on-the-fly > > while it is opened, but I can't find any way to do it. > > > Any ideas? > > Make your infoWindow content able to be referenced: > > map.openInfoWindowHtml(...,"<div id='myDiv'>Loading...</div>"); > > Then your AJAX callback can set > document.getElementById("myDiv").innerHTML > > Beware! This will not cause the infoWindow to be resized. It will only > change the content. If you need to resize the infoWindow because you > are retrieving more data than a few words, you will probably need to > close and re-open it. The graphics of the infoWindow are not easily > reachable, although since you can reach your div because you have > named it, you could crawl the DOM and restyle each div which makes up > the infoWindow. Not pretty. > > Note also that your named div will only exist while the infoWindow is > open. -- 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.
