Sep
15
2011

Replace body onunload=`GUnload()` with jQuery

If you use Google maps it’s important to use GUnload on the page's unload event. It's ok when you can access the body tag directly. But if you have the Google map functionality wrapped inside an ascx you need a different approach.

In fact is very easy to use jQuery to “catch” the unload event. In case anyone else needs it:

$(window).unload( function () { GUnload(); } );

About the Author: SGH

At the same time, I can’t think of anything more satisfying than sitting in front of TV, eating take-away, lights down low, in my pyjamas and watching crap on TV. Basically, I strive to live a balanced life. Fun. Serious. Fast. Slow. Brainy. Bimbotic. Intense. Lazy. You get the drift.

Leave a comment

Click to refresh

Subscribe to newsletter

Sign up with your email to get updates about new resources releases and special offers.