[Zope] question: javascript in zpt?

Dieter Maurer dieter@handshake.de
Wed, 12 Jun 2002 20:55:35 +0200


Roel Van den Bergh writes:
 > I have a nice javascript that renders the time
 > works fine in dtml
 > How can I use this in zpt pages ?
 > ...
The same way!
You tried and it did not work? What went wrong?

The SGML comment at the start and end of the script might pose
a problem.

But I would use an external JavaScript and not embed it inside
the page. This way, you give your browser a change to cache the script,
your page gets smaller, loads faster and is easier to maintain.
And the SGML comment problem goes away...


Dieter