Put one custom.js in your root, and one in each folder. Use <script src="custom.js"> and Zope will traverse the tree (from the current folder) looking for the "custom.js". You could even put this in your <standard_html_header> file if you wanted. I hope this is what you are looking for... Thanks, Derek Wilson -----Original Message----- From: mclinden@informed.net [mailto:mclinden@informed.net] Sent: Wednesday, October 29, 2003 8:40 AM To: zope users Subject: [Zope] TAL expressions within Javascipt? I'm moving an existing web site into Zope because the primary purpose of this site is document management and I want to be able to utilize Zope for content control. But the existing site has a large number of javascripted behaviors that are conditionally enabled based upon such things as browser capabilities. In particular, the system is setup to dynamically load certain scripts if certain capabilities exist. The form is: document.write("<scr" + "ipt src='http://x.y.z/custom.js' type='text/javascript'><\/scr" + "ipt>"); I would like to be able to change the "custom.js" file on a folder by folder basis, i.e., <script type="text/javascript" tal:attributes="src here/custom.js/absolute_url"></script> ...but can't figure out the appropriate way to do so within Javascript. Suggestions/pointers would be appreciated. Sean McLinden Allegheny County Health Department _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Wilson, Derek