[Zope] javascript vars in dtml

robert robert at redcor.ch
Fri Feb 25 18:26:57 EST 2005


cla wrote:

>Hi!
>
>i would like to know if its possible
>to pass javascript variables to dtlm methods.
>
>for example:
><script type="text/javascript">
>
>function general(){
>
>var t="hello"
>
>/* here is the problem until now
>within dtml the they dont recognize
>the t var */
>
><dtml-in "func(t)">
>...
></dtml-in>
>
>
>}
>
>
>
></script>
>
>  
>
You must be carefull not to mix (in your mind) what happens on the 
client and what happens on the server.
DTML is server base. It is used to generate a html-page and that is 
sendt to the client. The server knows nothing
about Javascript.

Javascript on the other hand is clent based. It "happens" after the 
client has recieved the html document from the server.
The client knows nothing about DTML.

Robert


More information about the Zope mailing list