my dog learned polymorphism*
The moose likes Struts and the fly likes How to set default image button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to set default image button" Watch "How to set default image button" New topic
Author

How to set default image button

Salman Bashir
Greenhorn

Joined: Aug 11, 2005
Posts: 3
Hello,

I have 2 image buttons on my jsp page. And I want to set one button to defualt. That is when the user hits an Enter key on this page that particular default button should get selected and do the action specified to it.

Need your suggessions.

Thanks for your help.

Regards,

Salman Bashir
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
Not sure I understand, is this a form post? Or just a link to an action?


http://www.goodercode.com
SCJP 1.4
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Browsers will render the page so that the first button in the form's html is the one that submits the form when the user clicks Enter.


A good workman is known by his tools.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to set default image button