i have two submit buttons in my jsp and when i clicked on the ENTER key always it's taking the first submit button which i dont wont. Can i put any default submit button in the jsp.
Can you guys help me please.
This is not i am looking for.Even in the example which you have given is also taking the first submit button. i.e after entering some text if i hit ENTER key it's taking the first SUBMIT button but i want to use the second button as DEFAULT. I want the submit button to be applied irrespective of its index.
That would mean establishing the key press handler for each and every field. Rather messy!
A much easier solution is to have one submit button that will be the "default" button. Make the other button of type "button" and use a click handler to cause it to submit the form just as if it were a submit button.