Pressing the Enter key on the keyboard will submit a form on a page...but it does not work when there is more than 1 form, ie 2 or more submit buttons on a page. Which makes sense. The Enter Key then needs to be coded, and only know how to make it submit a particular form.
I can't find out just how to find focus on the form...checking each form's element's focus would probably work but be cumbersome...
I can't find a property or attribute of a form to see if any of it's elements has focus to figure out how to write the code. Do any exist? Or, how can I code this without having to check the focus of all existing elements on the page?
Thanks!
I can't find out just how to find focus on the form...checking each form's element's focus would probably work but be cumbersome...
I can't find a property or attribute of a form to see if any of it's elements has focus to figure out how to write the code. Do any exist? Or, how can I code this without having to check the focus of all existing elements on the page?
Thanks!