Thank you Davide. I have been considering your suggestions and realize
I am looking beyond my skills with Javascript. I learn well by example
and was wondering if you knew of some source code I can look at, or
possibly some online or print tutorials for javascript/AJAX/google
maps API ? I have had a hard time finding good materials on these new
technologies.

Thank you!

On Mon, May 31, 2010 at 5:43 AM, Davide Cremonesi <[email protected]> wrote:
> Rossko is right: you have to move the definition of your function inside the
> javascript tag.
>
> The fragment:
> _________________________________________
> <?php
> }
>
> function updateMarkers() {
> ?>
> <script language="Javascript" type="text/javascript">
>
>        if(infowindow) {
>      infowindow.close();
>    }
> _________________________________________
>
> MUST BE
>
> _________________________________________
> <?php
> }
>
> ?>
> <script language="Javascript" type="text/javascript">
> function updateMarkers() {
>
>        if(infowindow) {
>      infowindow.close();
>    }
> _________________________________________
>
> and remember to close } before function bindInfoWindow.
>
> Going back to your question about AJAX, you are already using AJAX paradigm,
> this is what the ActiveXObject('Microsoft.XMLHTTP') does: the URL you load
> do not load a new HTML page in your browser but calls a javascrpt handler
> which updates the content of current page with the new data.
> Finally, the markers you should keep track of in order to clean them up are
> not the XML elements you receive in the response (var markers =
> xml.documentElement.getElementsByTagName("marker");) but the new
> google.maps.Marker you create and bind to map. You need a new global
> container for them.
>
> Hope it helps,
> Davide Cremonesi
>
>
> 2010/5/29 Rossko <[email protected]>
>>
>> > <?php
>> >
>> > }
>> >
>> > function updateMarkers() {
>> > ?>
>>
>> If you use 'view source' in your browser, is there a function
>> updateMarkers() actually getting to the browser ?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to