[7587] in www-talk@info.cern.ch
Distinguishing between submit buttons (SMTP Id#: 31343) -Reply
daemon@ATHENA.MIT.EDU (Matt Lewis)
Tue Mar 7 12:22:50 1995
Date: Tue, 7 Mar 1995 11:58:09 +0500
Errors-To: procmaster@www19.w3.org
Reply-To: mwl@nrc.gov
From: <mwl@nrc.gov> (Matt Lewis)
To: Multiple recipients of list <www-talk@www10.w3.org>
>>>>>>>>>>>>>>>
Hi,
Would someone know on how to distinguish between
two submit buttons
in the same form. In my application, one of them is for
"Browse", while
the other one is for "Submit". the CGI script has to take
different
actions for the two. Can't put browse in a separate form as
both buttons
need some common fields.
Thanxall
Rupesh
<<<<<<<<<<<<<<<
Use separate values in your submit button definitions, such
as:
<p><INPUT NAME="SUBMIT" TYPE="submit"
VALUE="browse"> </p>
<p><INPUT NAME="SUBMIT" TYPE="submit"
VALUE="submit"> </p>
Have your script search for the value of SUBMIT. If it
=browse execute the appropriate script or portion of the
script. If SUBMIT=submit, then execute the submit script or
portion of code.
Theoretically this should work, but I have not tried it, so I can
not validate it.
--- Nuclear Regulatory Commission
| Matt Lewis Email: mwl@nrc.gov |
| Network Solutions, Inc. Phone: 301-718-1770 |
| Bethesda, MD (Washington, DC) Fax: 301-907-3227 |