Hello,
 I make a HTML document,it has two buttons,it likes:
    ......
     <form action="/GetUserIdentity/servlet/GetUserIdentity" method="POST">
      <Input ID input type="Text" name="ID" align="left" size=15>
      <input type="Submit" name="okbutton"     value="      OK      " >
      <input type="Submit" name="cancelbutton" value="    Cancel    ">
    ......

My servlet is follows:
public class GetUserIdentity extends HttpServlet
{
  ......
 public void doPost(HttpServletRequest request,HttpServletResponse response)
     throws ServletException,IOException
 {
   String username=request.getParameter("ID");
   String action=request.getParameter("Submit");
   ...
   System.out.println("You pressed "+action+" button");
  ...
}

When I run it,and I press OK button,but I got:
  You pressed null button

Why?
I don't know how to get button,because I want to do follows:
1)If OK button is pressed,I process something
2)If Cancel button is pressed,I close IE

I have another two questions:
1)How to close IE?
2)I want to show Input ID with red color,How to modify the statement?
   <Input ID input type="Text" name="ID" align="left" size=15>

Any idea will be appreciated!
Thanks in advances!!!
Edward

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to