Hi Balogh

It did work,

I now have  <input type=submit value\"Submit + Finish\" name=enter>   and
                    <input type=submit value\"Submit + New Tail Collection\" name=enter>

in my doGet html form
 

I do the         request.getParameterValues("enter");

And then at the bottom of my doPost,  I have an,  if  else statement which works

So thanks for the advice, and also thank to the others who sent in pretty much the same solution

Kirstin

Balogh Andras wrote:

 Hi Kirstin ! I don't know if it works  (because i didn't tried)  but i think it could solve yuor problem: first the to sumbit button s should have the same name (name=enter) Than in the doPost methodString submit=request.getParameterValues("enter")[0] ; if(sumbit.equals("Submit+Finish") ) {                                           ...do something                                     }                          else {                               //  maybe you need a redirection too                                  response.sendRedirect(http://www.somewhere.com/form.html);                               }  If this doesn't work you could use some JavaScript code .Please let me know i will try to help because somehow it MUST work. Best wishes,                    Andras   
-----Original Message-----
From: Kirstin Battershill <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, May 06, 1999 10:56 AM
Subject: Possible daft question from beginner
 Question from a beginner in servlets

I have written my servlet but have come across a problem when I want to submit it :

 out.println("<input type=submit value=\"Submit + New Tail Collection\" name=enter>");

 out.println("<input type=submit value=\"Submit + Finish\">");

 out.println("<input type=reset value=\"Reset\">");

As you can see I want an option that allows me to go back to the start of the servlet if the Submit + new tail collection is pressed, or to get back to my main menu if the Submit + finish is pressed.  But I am uncertain how to proceed from here.  This code is in the doGet and the information is processed in doPost.

I hope this isn't to much of an obvious and easy problem to solve

Thanks

Kirstin
 
 

Reply via email to