Seriously? There's no AttributeModifier I can use to add an onunload attribute to body element?
If not, is it just a matter of "it hasn't been implemented"? Or is there some philosophical reason it isn't available? Thanks, Zach igor.vaynberg wrote: > > body onunload="if (GUnload!='undefined') GUnload();" > > -igor > > > On Sat, Mar 29, 2008 at 10:51 AM, Zach Cox <[EMAIL PROTECTED]> wrote: >> I'm using markup inheritance to reuse a base page template for all >> pages on my site. Some of these pages include Google Maps. According >> to best practices, the <body> element of the page needs an onunload >> event handler that calls the GUnload() function to eliminate memory >> leaks: >> >> >> http://code.google.com/apis/maps/documentation/introduction.html#LoadingMap >> >> I can't put this on the body element of the base page, since only a >> few pages need it. I tried adding a BodyTagAttributeModifier in the >> child page constructor but it did absolutely nothing to the body >> element: >> >> add(new BodyTagAttributeModifier("onunload", true, new >> Model("GUnload();"), this)); >> >> I understand the proper way to call onload Javascript is to use >> IHeaderResponse.renderOnLoadJavasript() but there's nothing for >> onunload. Is there any way for a child page to dynamically add an >> onunload attribute to the page's body element? >> >> Thanks, >> Zach >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/%3Cbody-onunload%3D%22GUnload%28%29%22%3E-for-Google-Maps-in-child-pages-tp16372664p16373185.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]