On Jan 2, 1:38 pm, David Easley <[email protected]> wrote: > > Can I attach event handlers programmatically, or will I have to resort > to having obtrusive event handlers (e.g. onclick="...") hard coded in > the HTML that I'm cloning?
Event handlers in the HTML should certainly work. It's difficult to tell what's actually going on without a link, but I suspect that at the time you attempt to navigate the DOM that particular element has not been added to it: that happens only when the infoWindow is constructed for display. You may be able to add your handlers *after* the openInfoWindow call -- but be aware that it can take some time to do everything in order to make the infoWindow references in the DOM available. You can optimise that time by doing a map.getInfoWindow() call after constructing the map: this forces the infoWindow module to be loaded then rather than at the first openInfoWindow. Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
