Hi,
I run across a little problem I dont know how to
solve, please help.

I have three buttons: OK, RESET, and EDIT and one
text-field. Under normal case, after entering the text
in the text-field, user will click on one of the three
buttons,And  I handle the button-events as followed in
my Action.java class:
 
String btnOK        = request.getParameter("OK");
String btnRESET     = request.getParameter("RESET");
String btnEDIT      = request.getParameter("EDIT");


if(btnOK != null)
{                               
   return return mapping.findForward("submit");
}

if(btnRESET != null)
{                               
   return return mapping.findForward("reset");
}
if(btnEDIT != null)
{                               
   return return mapping.findForward("edit");
}



Here come my question:

If the user enter the text in the text-field and press
the <ENTER> key (ascii=13) on the key board when the
text-filed still has the focus, ie. none of the button
is clicked, How do I force the form to submit? ie.
behave as the button OK is clicked.

For now, I have the blank screen browsed up.

Thank you very much.

Binh




__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Reply via email to