How to find two default submit buttons when i press the Enter key in asp.net using jquery?
I have two default submit button in a single web page.. one is in the main form.. and another one button is inside a div control.. this div control will be popup at login button click event.. so when i popup this div.. this div has a submit button and when i press enter key.. this button needs to submit.. if this div is closed.. i press enter key the main form submit button need submit the values.. how can i find the two submit buttons on enter key press even using jquery? please help. Thank you..
When the popup shows up, set the focus to the submit button of the popup div:
And, when the popup is closed, switch the focus back to the main form:
if you are using jQuery-UI's dialog, then put those lines in the open: and close: calls.