HTML Form/Page and Navigation with multiple buttons
Dave Borne
dborne at gmail.com
Thu May 31 09:53:14 EDT 2007
> How can I identify which button has been pressed. Do I need a
> separate form for each button and hide all the relevant session fields
> in each form or is there a way of identifying which button has been
> pressed on the page.
Hi, Richard,
Just give each button (or input) tag a distinct name attribute and a
value attribute. Also make sure the button is inside the form. When
the button is used to submit the form, FieldStorage will return the
name:value pair.
-Dave
More information about the Python-list
mailing list