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

Cross-Browser Compatability

P: 1
Hi All,
When i hit the EnterKey on password field, at that time it has to redirect into the home page, but it not redirecting.Below JS code work fine with all the browsers , Except IE11.
need help.
Thanks i advace.

Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript">
  2. function myTranslate(event)
  3. {
  4. var event = event || window.event;
  5.  
  6. if(event== 13)
  7.   {
  8.     submitForm('', 'mainForm');    
  9.   } 
  10.  
  11. }
  12. </script>
  13.  
  14. <form>
  15. <input id = "password"  maxlength="50" type = "password"
  16. name = "password" width = "250px" onkeypress="javascript:myTranslate(event)"/>
  17. </form>
  18.  
Jun 5 '15 #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.