aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Setting an image Button to Default on a jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Setting an image Button to Default on a jsp page" Watch "Setting an image Button to Default on a jsp page" New topic
Author

Setting an image Button to Default on a jsp page

Naveen bpl
Greenhorn

Joined: Apr 03, 2005
Posts: 11
Hi,

I am writting an application using jsp and struts.
I have 5 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.

Please suggest.

Thanks in advance.

Naveen
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61621
    
  67

Moved to the HTML/Javascript forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Play with this:

onkeydown="if ((event.which && event.which == 13) ||
(event.keyCode && event.keyCode == 13))
{document.FormName.ButtonName.click();return false;}
else return true;"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting an image Button to Default on a jsp page