Hi, having a form with some buttons.(Add, Edit, Del...). Every button shoulg call the same form, wich one should handle the diffrent button-methods. Please tell me a way how to get to know which button is pressed. Every button is in the REQUEST, but i can't see, which one is the caller. I have looked in the Source of the manageform with the Rename Cut, Copy ... buttons. This ones changes the actionmethod, but where is the method they calling (e.g. manage_cutObjects) witg regards Axel
You got to be kidding! <form action=process> <input name=button1 type=submit value="Button 1"> <input name=button2 type=submit value="Button 2"> </form> You are saying that when a form like this is processed, you can see both buttons in the REQUEST! Sounds like bug, because I know that only one should been seen in <dtml-var REQUEST> Z version? OS? Proxypass? Apache? ----- Original Message ----- From: "Axel Missbach" <Axel.Missbach@t-online.de> To: <zope@zope.org> Sent: Thursday, March 08, 2001 9:33 AM Subject: [Zope] What button submitted
Hi,
having a form with some buttons.(Add, Edit, Del...). Every button shoulg call the same form, wich one should handle the diffrent button-methods. Please tell me a way how to get to know which button is pressed. Every button is in the REQUEST, but i can't see, which one is the caller.
I have looked in the Source of the manageform with the Rename Cut, Copy ... buttons. This ones changes the actionmethod, but where is the method they calling (e.g. manage_cutObjects)
witg regards Axel
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Zope Version:Zope 2.3.0(binary release, python1.5.2, linux-2-x86) Python Version: 1.5.2(#10 Dec 6 1992, 12:16:27)(GCC 2.7.2.3) System Platform: linux2 Suse linux 7.0(i386), Kernel 2.2.16 Apache 1.3.12 the REQUEST-content: see attachment (New, Print, Edit, Del, Close are the buttons) Peter Bengtsson wrote:
You got to be kidding! <form action=process> <input name=button1 type=submit value="Button 1"> <input name=button2 type=submit value="Button 2"> </form>
You are saying that when a form like this is processed, you can see both buttons in the REQUEST! Sounds like bug, because I know that only one should been seen in <dtml-var REQUEST>
Z version? OS? Proxypass? Apache?
----- Original Message ----- From: "Axel Missbach" <Axel.Missbach@t-online.de> To: <zope@zope.org> Sent: Thursday, March 08, 2001 9:33 AM Subject: [Zope] What button submitted
Hi,
having a form with some buttons.(Add, Edit, Del...). Every button shoulg call the same form, wich one should handle the diffrent button-methods. Please tell me a way how to get to know which button is pressed. Every button is in the REQUEST, but i can't see, which one is the caller.
I have looked in the Source of the manageform with the Rename Cut, Copy ... buttons. This ones changes the actionmethod, but where is the method they calling (e.g. manage_cutObjects)
witg regards Axel
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Axel Missbach
having a form with some buttons.(Add, Edit, Del...). Every button shoulg call the same form, wich one should handle the diffrent button-methods. Please tell me a way how to get to know which button is pressed. Every button is in the REQUEST, but i can't see, which one is the caller.
You are doing thing the wrong way around here. You can make zope call a method for you, so you don't have to see what button has been called. These two buttons will call the methods save() and delete() in your class. <input type="submit" name="save:method" value=" Save "> <input type="submit" name="delete:method" value=" Delete "> You must then make methods that can reply to these methods. Ie. you can make two dtml methods or Python scripts called save and delete in the object that holds you form. regards Max M
participants (3)
-
Axel.Missbach@t-online.de -
Max M -
Peter Bengtsson