troubleshooting Question

Return key behavior

Avatar of codequest
codequest asked on
JavaScript
3 Comments1 Solution427 ViewsLast Modified:
I've got an ASP.NET gridview that I've modified by causing an "insert" row to appear in the middle of it.  The insert row has one text input field (and variations may have several).   This is all done in javascript.    I don't think the ASP.NET aspect matters but I thought I would describe it to be clear.

What I now need to know is how I might control the return key behavior in this situation.  I'd like the return key to do nothing if the focus is on the text fields.  Then, when the focus is on an <img> that I'm using as an "enter" key, I'd like the enter key to essentially "press the button" (or fire the associated function).

Any guidance on this would be appreciated.

Thanks!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros