By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,899 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,899 IT Pros & Developers. It's quick & easy.

How To Navigate through Enter key

P: 4
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.         $(document).ready(function () {
  3.  
  4.             var inputs = $(':input,select').keypress(function (e) {
  5.                 if (e.which == 13) {
  6.                     e.preventDefault();
  7.                     var nextInput = inputs.get(inputs.index(this) + 1);
  8.                     if (nextInput) {
  9.                      nextInput.focus();
  10.  
  11.  
  12.                     }
  13.  
  14.                 }
  15.             });
  16.  
  17.         });
  18.  </script>
// this js shows an error when it focus on dropdown box//
Sep 27 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.