Distinguishing between submit buttons (SMTP Id#: 31343) -Reply

>>>>>>>>>>>>>>>
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  |

Received on Tuesday, 7 March 1995 11:27:04 UTC