On Apr 29, 11:19 am, Nick Boyle <[email protected]> wrote:
> Where I don't have to have access to the <head> area. I am working within a
> CMS and can only inject code where I need to put the map. So, I would like
> an example of the code which I can place anywhere within the page. (i.e. no
> access to the <body> tag either etc, which all examples seem to use
> heavily).

Oh, right.

You can place the API <script> tag anywhere. You can put your map-
control script either in a block at the bottom of the page -- it will
be executed once the rest of page is rendered -- or anywhere in the
body in a function which can be set to be executed on-load.

The on-load option mimicks the examples which use <body onload>. You
can create an onload event handler in Javascript:

window.onload = loadfunction;

If your CMS uses <body onload> to do its own stuff, then that line
will override it. You can *add* your loadfunction to the existing
onload handler:

window.onload = function(){window.onload;loadfunction};

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to