[Zope] Calling DTML Methods from JavaScript?

Dieter Maurer dieter@handshake.de
Fri, 28 Dec 2001 17:35:09 +0100


Dan Shafer writes:
 > ...
 > In the JavaScript I use on the client side (I can't see a way to keep 
 > the user on the form using dtml), I have a conditional. The if 
 > portion pops up a dialog, reminding the user of his or her oversight, 
 > then selects the improperly omitted field. The else clause is 
 > _supposed_ to call the dtml method that updates the MySQL database 
 > and thanks the user for the submission. That's where the problem 
 > arises.
You have a client-server application: Javascript runs on the client,
DTML on the server. There is only one link between client
and server: HTTP requests and their responses.

As you may see, there is not way for Javascript to call any DTML Method
directly. Its only way to do it indirectly is to issue a HTTP request
which calls the DTML Method.

For more background information, see

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>




Dieter