[Zope] DTML and JavaScript

Geir Bækholt Hansen Geir B Hansen <geirh@funcom.com>
Wed, 3 May 2000 08:53:24 +0200


awfc> I have some listboxes that depend on each other such that if an entry
awfc> is selected in one of them the contents (filled by ZSQL scripts) of
awfc> the others change.
awfc> I assume that this is not possible with DTML solely. Therefore I
awfc> consider JavaScript.
awfc> But I have no experience with it and I ask myself if (and how) it is
awfc> possible to mix DTML and JavaScript eg. using the onChange() event.
awfc> Is there any documentation or examples on this theme that I can have
awfc> a look at?

awfc> TIA,
awfc> Andreas

The important issue to consider when using
Javascript/ECMAscript with Zope is that DTML-processing all
takes place on the server running Zope, but all
Javacript-processing takes place realtime in the clients
browser without contacting the server.

It should be rather simple to integrate the two, as they
work on different platforms, and therefore won't interfere
with each others operations.

The only problems i've heard about is that the field-types
sometimes used by Zope ( <input type="text"
name="field1:tokens"> ) tend to confuse the
javascript-references to these fields.
Haven't checked this out much myself, though.

Apart fom this, making the two work together should work
nice and dandy ; you could even use Zope to generate your
Javascript on the fly if you'd want this.

Good luck

--
Geir Bækholt Hansen
web-developer/designer
geirh@funcom.com
http://www.funcom.com