[Zope-CMF] How to allow CMF's actions to trigger javascript functions? SOLVED

Ausum Studio ausum_studio@hotmail.com
Mon, 31 Mar 2003 12:01:46 -0500


----- Original Message -----
From: "Chris Withers" <chrisw@nipltd.com>



> Ausum Studio wrote:
> > Portal actions in CMF are triggered by calling methods given certain
> > conditions and user permissions, but what if some actions (acting on the
> > context object) needs to call a javascript function rather than a whole
> > transaction?
>
> Please provide a conrecte example of what you'd like to be able to do so
we can
> help out :-)

Thanks. I could figure it out. This is an example case:

Suppose that you want to provide all the info about any contentish object
without disturbing the page's graphic design. You don't want an "Info" box
anywhere, but the information to be displayed within an alert dialogue box
called by a javascript function  named "showInfo()".

To embed  this call within the actions box (since we choose to do this to
rely on its display machinery), you just use in the current action's field
"Action":

string: javascript:showInfo()



Ausum








> cheers,
>
> Chris
>
>