OK, I've declared the variable outside like so: var exmll = new EGeoXml;
and now clicking on the markers work, but the sidebar is still throwing up the error 'a is undefined' Any ideas? On Aug 20, 6:01 pm, pezholio <[email protected]> wrote: > Ah cool, so I just declare exml as a blank variable outside the > function like so? > > var exml = ""; > > Sorry, I'm not the most JS literate person in the world! :) > > On Aug 20, 5:28 pm, Mike Williams <[email protected]> wrote: > > > You need to keep the reference to the EGeoXml in a *global* variable. > > Your "exml" variable is local to toggleMarker(). > > > It needs to be global because code launched from clicks on HTML > > elements, such as sidebar entries, execute in global context. > > > -- > > Mike Williamshttp://econym.org.uk/gmap --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
