try using this
<input type="Submit" name="okbutton" value=" OK
" onClick = "document.form.submit(); ">
<input type="Submit" name="cancelbutton" value=" Cancel
" onClick = "window.close();">
for the coloring you need to use CSS.
Regards
Ramesh Kesavanarayanan
[EMAIL PROTECTED]
Off: 91-44-8113801 ext 2333
Res:91-44-2265360
Mob : 91-98412-73573
> -----Original Message-----
> From: Edward [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, May 17, 2002 10:43 AM
> To: [EMAIL PROTECTED]
> Subject: Who to get button?
> Importance: High
>
> 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
___________________________________________________________________________
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