I edited the code to make it synchronous(to false) but now i dont get the data at all.
On Mar 5, 6:16 pm, "[email protected]" <[email protected]> wrote: > On Mar 5, 3:52 pm, Ivan <[email protected]> wrote: > > > > > > > Hi Guys, > > > I have some code which i try to get a string eg: > > > subcategoryhtml = getsubcategories(submitcategory); > > > Which will execute the code below that should get a list of categories > > from an xml file. However this code doesnt work until the next time > > around or other click. I have a feeling some part of the code executes > > before the request is done. Can anyone help me figure what I am doing > > wrong. > > > function getsubcategories(submitcategory){ > > request.send(null); > > return subcategorytexthtml; //This is global variable > > GXmlHttp is asynchronous.http://econym.org.uk/gmap/async.htm- Hide quoted > text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
