I'm trying to alter the contents of the info-window using javascript.
I know I could just re-generate the infoWindow elements or HTML each
time I call openInfoWindow(), but I'd like to keep the HTML in a
template so non-programmers can edit it, and just fill in the values
using the IDs of the elements (which is simple enough using jQuery).

At first, I had simply included a 'script' tag in the infoWindow HTML,
but Firefox was the only browser that would execute such a tag when it
appeared in the DOM.

So now I execute the bit of code after calling openInfoWindow(). The
problem is the first time I call openInfoWindow() in a session it
seems to return before the actual infoWindow elements are in the
document, since the code that puts the right text in them doesn't seem
to have an effect. Once the info-window has been opened once,
everything works fine.

see http://roundtable.dyndns.org:2000/temp/google-maps-problem.html .
type in a placename and hit 'add a marker'. The new marker will appear
and the info-window will open, but without the placename or lat/lng
filled in. Close the info-window and click on the marker to re-open
it, and everything's filled in. (note that the 'add entry' button
won't work, since this page is excerpted from the actual site I'm
building. It doesn't matter for demonstrating the problem though.)
Submit a new placename to the form at the top of the page and the
marker will move there, and the info window will open with the text
filled in correctly too.

So, my question is:

- Why does openInfoWindow() seem to be asynchronous? Is it supposed
to?
- Is there an event I can listen for to know when the info-window's
elements have actually been inserted into the document?

Thanks in advance,
Morgan Wahl

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