Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need enclosing form name of a element in jquery

 
Maan Suraj
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
suppose i have below code

when the focus is on any of the elements within the form(say on "test1" or "test2").When i hit the enter button through keyboard, I want a jquery function to be called, which checks what the enclosing form name is based on the focus
 
Jagdeep Sharma
Ranch Hand
Posts: 121
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maan Suraj wrote:Hi
suppose i have below code

when the focus is on any of the elements within the form(say on "test1" or "test2").When i hit the enter button through keyboard, I want a jquery function to be called, which checks what the enclosing form name is based on the focus


You can do something like this

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Untested, but I believe this will get you what you want.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic