|
Posted by nettleby@googlemail.com on 04/17/06 21:05
JDS wrote:
> On Mon, 17 Apr 2006 04:25:41 -0700, nettleby wrote:
>
> > You would get two different strings being submitted here, for the two
> > buttons. Is this a valid way of doing things?
>
> No you would not.
>
> The server will only "see" the button that was pressed.
>
> Did you try it before you posted this question?
> Did you Google about this question before posting?
Yes to both, and read at least two books!
When I try my code, I can tell the difference between the submit and
reset button being transmitted to the cgi validation page I'm using.
I've coded it so the submit button doesn't have a name, and the reset
button does.
code is at:
http://www.debsweb.co.uk/test1.htm
In practice, when the submit button is clicked, then there is no data
transmitted for the button, obviously, as there is no name. When the
reset button is clicked, then the appropriate name/value pair is
transmitted. I would have thought this meant the server end could
differentiate between the two buttons, as long as it's aware of the
design of the page? (Leaving aside the complications of the Enter key
being pressed.)
Debbie
[Back to original message]
|