Monday, 1 November 2010

Run Google Maps GUnload() function with jQuery or Prototype

Typically the method used to run the Google Maps GUnload() function would be to place it in the body tag:

<body onunload="GUnload()">

But what can you do if you can't access the body tag directly?  Other options are available if you happen to be using using a javascript library such as jQuery or Prototype.

For jQuery use:

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

For Prototype use:

Event.observe(window, "unload", GUnload);

5 comments:

  1. Thank you for sharing the script, I'm learning Java and it will be used a little later. Recently I saw a software View source which is very popular among the transport companies, taxi services and the delivery of goods. It's brilliant, is not it? Now I plan to develop something similar in the future because my father is already actively using such an application for business, maybe in the future, I hope I'll increase my skills and be able to please him with my programming achievements.

    ReplyDelete
  2. Sure shot Single target nifty weekly option tips, nifty weekly options, intraday weekly option tips, weekly options trading, weekly options trading strategies, nifty weekly options trading strategies, nifty weekly options strategy

    ReplyDelete
  3. Thanks for sharing this useful article. Well described with useful information.

    Thanks again.
    Trading school

    ReplyDelete
  4. Thanks for sharing this useful article. I have learnt a lot of things.
    If you need
    Perth Wedding Photographer

    Margaret River Wedding Photographer

    Paris Pre Wedding Photographer
    Contact BenYew.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete