[Zope] TAL and Javascript

Lennart Regebro regebro at gmail.com
Wed Jun 29 13:06:57 EDT 2005


On 6/29/05, Rob Boyd <boydrobh at yahoo.com> wrote:
> But: I cannot get the Javascript var into the namespace that the TALES
> expression knows about.

TALES are executed on the server, when the template is rendered.
Javascript is executed on the client after the template has rendered,
and hence, well after the TALES have been executed.

So, no you can't do that without making a new roundtrip to the server.
You have two options: Either use the Javascripts onClick to make an
XML call to the server to fetch the new data (not trivial) or send all
the data from the start.

This last thing is what almost all sites do with all that type of
Javascript functionality.

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the Zope mailing list