Hi Andrew, Thank you for your reply!
I'm a bit puzzled...GDownloadUrl is asynchronous, yes... Still a newbie and I need to ask...my callback-function in this case...what is that? I have the serverside-script (PHP) that generates the correct XLM- structure. Now I need to read that and display it... Please push me in the correct direction...I'm a bit lost in the big Map-forrest...:-) And yes, I'm a big fan of Mikes Map-tutorial. Thanks! /Nimrod On May 14, 11:32 am, Andrew Leach <[email protected]> wrote: > On May 14, 10:07 am,nimrod<[email protected]> wrote: > > > > > Hmmm...next challenge is that FF complaints on: > > var markers = xml.documentElement.getElementsByTagName("marker"); > > and says that "XML is not defined". I reverified that the XML is > > printed as it should and it is ok. > > > Do you (or anybody else) have a suggestion? > > GDownloadUrl is asynchronous. That means it gets on with the job > behind the scenes and then calls the "callback function" to deal with > the results when it's finished. Your callback function defines the > variable "xml". > > Once GDownloadUrl has started to do its stuff, the main execution > carries on in the foreground. The next line tries to use "xml", which > is only defined in the callback function, and that hasn't run yet. > > You need to do everything with "xml" **inside** the callback function. > > Mike has an explanation of asynchronous code in his > tutorialhttp://econym.org.uk/gmap > > 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 -~----------~----~----~----~------~----~------~--~---
