I'm getting errors when I try to load the scripts as below (script src...) within the initmap function as it prints out everything below that on the top of the page...like its not recognizing it as javascript. And the problem with calling it before the function initmap is that the api hasn't been loaded (google.load occurs at end of page and calls api and then initmap), and since some elements in geoxml and elabel depend on the google api already being loaded, there are errors. Is there a way I can load the javascript within the function and ensure that they've been completely fetched/loaded before the call to new GeoXML is made...so the javascript files are ready to go? I tried the window.onload but it didn't seem to work. Thanks, Shad
On Jun 3, 11:42 pm, Mike Williams <[email protected]> wrote: > It's a timing issue. > > This code requests the geoxml.js file to be fetched > > newScript.src = 'http://www.wrh.noaa.gov/zoa/js/geoxml.js'; > headID.appendChild(newScript); > > but then you don't have any delays before you call GeoXml(), so the call > happens before the geoxml.js code fetch completes, resulting an a > "GeoXml is not defined" error message. > > Why not just use > <script src='js/geoxml.js' type='text/javascript'></script> > > -- > 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 -~----------~----~----~----~------~----~------~--~---
