Hello, I have a ZPT METAL macro slot for menu bar navigation. The menu bars have JavaScript image mouseovers that I want to preload using the "onload" attribute in the body tag. How can I change the images that I preload when I use different navigation in the slot? Michael
Perhaps, create another slot which evaluates to an TAL expression which generates javascript that evaluates to an array of the appropriate images? A. -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Michael LaPera Sent: Monday, January 27, 2003 9:12 PM To: zope@zope.org Subject: [Zope] Changing HTML tag attributes with ZPT macros Hello, I have a ZPT METAL macro slot for menu bar navigation. The menu bars have JavaScript image mouseovers that I want to preload using the "onload" attribute in the body tag. How can I change the images that I preload when I use different navigation in the slot? Michael _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
hi, ;; Michael = Michael LaPera <michael@lapera.com> Michael> I have a ZPT METAL macro slot for menu bar navigation. The menu bars Michael> have JavaScript image mouseovers that I want to preload using the Michael> "onload" attribute in the body tag. Michael> How can I change the images that I preload when I use different Michael> navigation in the slot? how about this ? Page Template =============== <body tal:attributes="onLoad here/preload"> ... </body> Python Script =============== # preload dirlist = ['a','b','c'] # or put values dynamically (as i do on my website) result = "MM_preloadImages('" + string.join(map((lambda x: "menu_"+x+"_on.gif"), dirlist),"','") + "')" return result -- Sumiya Sakoda <sakoda@toyoake.or.jp>
participants (3)
-
Andrew Athan -
Michael LaPera -
Sumiya Sakoda