Re: HTML Form/Page and Navigation with multiple buttons
- From: Paul Boddie <paul@xxxxxxxxxxxxx>
- Date: 31 May 2007 06:52:56 -0700
On 31 May, 15:22, mosscliffe <mcl.off...@xxxxxxxxxxxxxx> wrote:
[Multiple submit buttons in HTML forms]
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.
When you define the buttons like this...
<input name="new" type="submit" value="New search" />
<input name="start" type="submit" value="Start" />
<input name="previous" type="submit" value="Previous" />
<input name="next" type="submit" value="Next" />
<input name="last" type="submit" value="Last" />
When the user selects one of the buttons, you should get an entry for
the field representing the button in the FieldStorage object. So, if
the user presses the "next" button, there should be an entry mapping
that name ("next") to some value ("Next" in the above example) in the
FieldStorage object.
Paul
.
- References:
- HTML Form/Page and Navigation with multiple buttons
- From: mosscliffe
- HTML Form/Page and Navigation with multiple buttons
- Prev by Date: Re: WEATHER PROGRAMMING IN PYTHON
- Next by Date: Re: WEATHER PROGRAMMING IN PYTHON
- Previous by thread: HTML Form/Page and Navigation with multiple buttons
- Next by thread: Re: HTML Form/Page and Navigation with multiple buttons
- Index(es):