I'd consider using unobtrusive JavaScript so that you can add event listeners without having to add them directly to your body element. You can do this with jQuery or pretty much any other JavaScript library. Email me off-list if you want more info on how this would be done (since it's not ZF related).
On Fri, Nov 27, 2009 at 3:45 PM, tonystamp <[email protected]> wrote: > > Hello > > I am using a layout for about 30 pages, but one page which has a google map > embedded in it requires that i add two events to the body tag of the > document. Obviously i don't want to add it for every page that doesn't need > it, so i'm not going to add it to the layout (it would also cause js errors, > as the js code is included in the page with the map in it). > > Is there a way to simply add the extra line of code to the body in the > controller, or will i need to use another layout to define the body events > just for that page? It would seem a waste, as everything else is identical > :? > -- > View this message in context: > http://n4.nabble.com/Adding-onload-event-to-body-on-one-page-only-tp797274p797274.html > Sent from the Zend Framework mailing list archive at Nabble.com. > -- Bradley Holt [email protected]
