> Can anyone please advise me with a problem.
>
[quoted text clipped - 5 lines]
> parameter
> to the servlet telling it which button was pressed.How do I do this?

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
OK If I have <input type="Submit" name="AddProduct" value="Add Product">
Is the name "AddProduct" automatically sent to the server when the button is
pressed or do I need to do something else with the name first?
> > Can anyone please advise me with a problem.
> >
[quoted text clipped - 17 lines]
> Chris Smith - Lead Software Developer/Technical Trainer
> MindIQ Corporation
Chris Smith - 10 Jun 2005 14:35 GMT
> OK If I have <input type="Submit" name="AddProduct" value="Add Product">
> Is the name "AddProduct" automatically sent to the server when the button is
> pressed or do I need to do something else with the name first?
Nope, that's all you need to do. One of the form parameters will then
have a name of "AddProduct" and a value of "Add Product", if that button
is used to submit the form.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Johan Poppe - 10 Jun 2005 14:38 GMT
Kevin Robinson wrote:
>OK If I have <input type="Submit" name="AddProduct" value="Add Product">
>Is the name "AddProduct" automatically sent to the server when the button is
>pressed or do I need to do something else with the name first?
The browser sends a parameter with the name "AddProduct" and the value
"Add Product".
If another button is pressed, you'll get something else. For example,
if the user clicks a button defined with <input type="Submit"
name="RemProduct" value="Remove Product">, you will get no parameter
named AddProduct parameter, but instead you'll get a parameter named
RemProduct with the value "Remove Product"..
If you are in doubt of what parameters you actually get, it's easy to
write a testing servlet that simply echos all parameters, or write
them to a servel log or something.

Signature
Johan Utne Poppe