Thanks you guys, Indeed, I just 'copy & paste' the javascript code from php to my zpt and voilĂ , it worked. Sorry for bothering you guys with such a simple question, but at first I was wondering zope would have something more interesting, never mind. Many thanks. Cheers, Alan On 14/06/07, Maciej Wisniowski <maciej.wisniowski@coig.katowice.pl> wrote:
I have a web page with some buttons (<form action=...) to perform some action (by calling a python script). However, some actions (like 'delete' a picture for example) I would like to warn user before performing it. I recall from php how to pop up a window (or a drop down in Mac OSX) with a warning message prompting a 'Yes' or 'No' confirmation and I was wondering how would I do it with Zope, with an example if possible. If you've opened pop up window "with php" then in fact it had to be JavaScript. Possibly you're looking form something like:
if (confirm("Do you really want to remove this picture")) return true return false
which may be used with onsubmit event of form object. Of course this is javascript code not python.
-- Maciej Wisniowski