[Zope3-dev] menuitem constraints or another wish
Roger ineichen
dev at projekt01.ch
Mon Jan 5 16:58:27 EST 2004
Hello zope3 developers
What do you think about to have a menuItem in form of a
javascript? Is there a way to do that.
A example; I whould like to add a zmi_actions who calls
a javascript for do stuff like xmlhttp requests.
But is there a option to add a menuItem (action)
which calls a javascript? I think the attribute action
in the menuItem directive don't allowed to use others
then a real callable views.
I whould like to add a menuItem like;
<menuItem
menu="zmi_actions"
for="AInterface"
action="javascript:setBrowserWidth('browser','navigation_width','200')"
title="Set a custom property"
description="This menu item calls a xmlhttp request in the background
and
set the property navigation_width on the browser profile
to 200 pixel." />
or call a view not directly, just call a view by a javascript. And the
javascript is calling the view. This way we can do stuff in the background
without to refresh the html page.
Example;
<menuItem
menu="zmi_actions"
for="AInterface"
action="javascript:setMyProperty('@@aView.html', 'attr1', 'attr2')"
title="Calls th script"
description="This menu callsa xmlhttp request in the background and
set the property navigation_width on the browser profile
to 200 pixel." />
Then javascript is calling the view "@@aView.html" with the given
attr1 and attr2, does something we want an returns a javascript
alert or debugs a status message with a javascript method like
"debug" in xmltree.js.
Is there a way to do that?
Or should I implement a own (menuItem) directive in our project?
Regards
Roger Ineichen
_____________________________
Projekt01 GmbH
www.projekt01.ch
Langackerstrasse 8
6330 Cham
phone +41 (0)41 781 01 78
mobile +41 (0)79 340 52 32
fax +41 (0)41 781 00 78
email r.ineichen at projekt01.ch
_____________________________
END OF MESSAGE
More information about the Zope3-dev
mailing list