From mr.hworth at gmail.com Tue Jan 1 19:20:27 2008 From: mr.hworth at gmail.com (Matt Hollingsworth) Date: Tue Jan 1 19:20:36 2008 Subject: [Zope] Best Practice for including Javascript in Zope Applications Message-ID: <001001c84cd5$47aacca0$460aa8c0@home.msh> Hello, I'm new to developing for zope, and I have a quick question regarding some best practices when using Javascript in zope applications. I would like to use Ext JS (http://www.extjs.com/ ) in an application that I am writing. It is a fairly extensive library, so I didn't really want to copy/paste every single file into a dtml method. I looked all over the place for some discussion on this subject, but only found things relating to plone (which apparently has a javascript registry); however, I wish to stay away from plone for this particular application. What should I do to use these libraries? Is there a canned solution for this sort of thing? Thank you much! -Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope/attachments/20080101/5be513ab/attachment.htm From tseaver at palladion.com Tue Jan 1 21:16:21 2008 From: tseaver at palladion.com (Tres Seaver) Date: Tue Jan 1 21:16:34 2008 Subject: [Zope] Re: Best Practice for including Javascript in Zope Applications In-Reply-To: <001001c84cd5$47aacca0$460aa8c0@home.msh> References: <001001c84cd5$47aacca0$460aa8c0@home.msh> Message-ID: <477AF3F5.6030500@palladion.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Matt Hollingsworth wrote: > I'm new to developing for zope, and I have a quick question regarding some > best practices when using Javascript in zope applications. > > > I would like to use Ext JS (http://www.extjs.com/ ) in an application that I > am writing. It is a fairly extensive library, so I didn't really want to > copy/paste every single file into a dtml method. I looked all over the > place for some discussion on this subject, but only found things relating to > plone (which apparently has a javascript registry); however, I wish to stay > away from plone for this particular application. > > What should I do to use these libraries? Is there a canned solution for > this sort of thing? The simplest route: - Create a "File" object in the ZMI for each separate javascript library (e.g., 'extlibrary.js'). - Upload the static content of the library file to that object. - Include a link to the JS library in your master page template, e.g.::