[thelist] Google Map - onload & onunload without access to <body>

Jono Jono at charlestonwebsolutions.com
Tue Aug 11 04:34:21 CDT 2009

Essentially, yes that is what I am after.  I won't have access to the <head> either, so this will all go inline.  How do I ensure - body onload="initialize()" onunload="GUnload()" - happens using your example?  I see how what you mentioned works, but how do I make that do the onload and onunload that is attached to the body?

Shot in the dark guess:

<script type="text/javascript">
$(document).ready( function() { $("body").bind("onload", initialize()).("onunload", GUnload())});


Hassan Schroeder wrote:
> On Mon, Aug 10, 2009 at 5:02 PM, Jono<Jono at charlestonwebsolutions.com> wrote:
> So you need to do something like this:
> <script type="text/javascript">
> $(document).ready( function() { $("body").bind("click", function(){
> alert("wtf");})});
> </script>
> :: where, when the document is loaded in the browser, some function
> is bound to an event on the "body" element(s) -- hopefully there's only
> one :-) -- to do whatever.

More information about the thelist mailing list