[Zope] Some questions for experienced zopers
Thomas B. Passin
tpassin@mitretek.org
Tue, 19 Oct 1999 10:37:34 -0400
kayak <van_lindberg@byu.edu> wrote
> I've got two pressing questions that I can't seem to find answers
> to on zope.org:
>
> 1. What is the relationship that dtml has (if any) to
> javascript? Specifically,
> I want to do onmouseover swapping of a .gif. It seems to me that
> it would be simple with dtml, something like
> <dtml-if img1 mouseover == true>
> <dtml-var img2>
> <dtml-else>
> <dtml-var img1>
> </dtml-if>
>
> but I can't find a reference to any such functions. Otherwise,
> what is the best way to integrate js and dtml?
A browser normally does mouseovers completely in the browser. That is, the
server has no way to know that a mouseover occurred. This is what you normally
want, because the only way to interact with the server is to request another
page. You don't want to ask for a new page just for a mouseover event. There
are a few standard ways to handle the mouseover change ov images using
javascript on the browser - many javascript books and articles show how to do it
(usually by caching the other image in a javascript variable).
So DTML wouldn't be involved at all.
Tom Passin