This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am using a jsp which have multiple input text boxes, a Search button (submit action) and a Advance Search (another submit button).
Is there any way to specifically mention which button to foucs ?
I am not sure what you are talking about here. Are you focusing the button or are you talking about the browser's default behavior?
Joined: Jun 15, 2006
I have input search text field. And two buttons label "Advance Search" and "Search". Both the are of type "submit"
Now in the jsp (JSF) file , the "Advance Search" button comes first and then the "Search" button.
When the user clicks input text are, the first button of "submit" type gets focus. Is there a way to specify which button should get focus by default?
Joined: Nov 08, 2001
The form will select whatever comes next. You can look into tab index, but I doubt it will make a difference with default submit action.