A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
button focus problem with multiple <html:submit> buttons
Joined: Jun 04, 2007
Jan 27, 2009 03:02:28
I have a
having two textbox with "Cancel" and "Submit" buttons. Both buttons are <html:submit> type.
After typing in textbox if we press <Enter> key, the Cancel button is executed. This is because the cancel button is the first button on page and is by default focussed on pressing <Enter> key.
I want the second button ("Submit") to be focussed by default.
My Code is something like -
<html:submit property="bipSubmit" value="Cancel"/>
<html:submit property="bipSubmit" value="Submit"/>
SCJP 5.0, SCWCD in progress
It is sorta covered in the
JavaRanch Style Guide
subject: button focus problem with multiple <html:submit> buttons
Multiple Submit Buttons?
DispatchAction and html:cancel
LookupDispatchAction + html:cancel
textbox - onBlur, fire off a Struts action
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014