File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need enclosing form name of a element in jquery

 
Maan Suraj
Ranch Hand
Posts: 299
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Untested, but I believe this will get you what you want.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic