title: event.keyCode not working in Firefox
body: <p>I'm having a problem with a Login page I'm developing on ASP.net C#.
  The form works on IE, but not Firefox.
  Here's my sample:</p>
  
  <pre><code>&lt;%@ Page Language="c#" Inherits="ClubCard.loginClubcard" CodeFile="loginClubcard.aspx.cs" %&gt;
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" &gt; 
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;
              Acceso Clubcard
          &lt;/title&gt;
  
          &lt;meta http-equiv="Page-Enter" content="blendTrans(Duration=0.25)" /&gt;
          &lt;meta http-equiv="Page-Exit" content="blendTrans(Duration=0.25)" /&gt;
          &lt;link rel="stylesheet" type="text/css" href="styles.css"&gt;
  
          &lt;style&gt;
              #centered
              {
                  LEFT: 50%;
                  MARGIN-LEFT: -235px;
                  POSITION: absolute;
                  TOP: 150px
              }
  
              .letras
              {
                  FONT-SIZE: 10pt;
                  COLOR: white;
                  FONT-FAMILY: Arial
              }
  
              .cajas
              {
                  FONT-SIZE: 10pt;
                  FONT-FAMILY: Arial
              }
  
              .letrasGris A
              {
                  FONT-SIZE: 12px;
                  COLOR: #8f8f92;
                  FONT-FAMILY: Arial;
                  TEXT-DECORATION: none
              }
  
              .highlightit IMG
              {
                  FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
                  -moz-opacity: 1
              }
  
              .highlightit:hover IMG
              {
                  FILTER: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
                  -moz-opacity: 0.5
              }
          &lt;/style&gt;
  
          &lt;script language="javascript"&gt;            
              function actLogin()
              {
                  __doPostBack('btnLogin', '');
              }
  
              function actFocus()
              {
                  tbxPrincipal = document.getElementById("tbxUsername").focus();
              }
  
              function ValidarEnter(src)
              {
                  if (event.keyCode == "13")
                  {
                      actLogin();
                  }
              }
  
              function AbrirLogin() 
              { 
                  if (window.frameElement != null) 
                  { 
                      window.parent.location.replace(window.location.href); 
                  } 
              } 
          &lt;/script&gt;
  
          &lt;meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"&gt;
          &lt;meta name="CODE_LANGUAGE" content="C#"&gt;
          &lt;meta name="vs_defaultClientScript" content="JavaScript"&gt;
          &lt;meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"&gt;
      &lt;/head&gt;
  
      &lt;body bgcolor="#ffffff" leftmargin="0" topmargin="0" onload="AbrirLogin();actFocus()"&gt;
          &lt;form id="Form1" method="post" runat="server" target="_top"&gt;
              &lt;table id="Table_01" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"&gt;
                  &lt;tr&gt;
                      &lt;td style="background: url(images/login/loginBg.gif) repeat-x"&gt;
                          &amp;nbsp;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
  
              &lt;div id="centered"&gt;
                  &lt;div style="left: 50%; margin-left: -100px; position: absolute"&gt;
                      &lt;div&gt;
                          &lt;img src="images/login/logoClubCard.gif"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;div style="margin-left: 100px; width: 200px; position: absolute; top: 240px"&gt;
                      &lt;table width="100%" cellpadding="0" cellspacing="2" border="0"&gt;
                          &lt;tr&gt;
                              &lt;td align="right" class="letras"&gt;
                                  USUARIO:
                              &lt;/td&gt;
  
                              &lt;td&gt;
                                  &lt;asp:TextBox runat="server" CssClass="cajas" ID="tbxUsername"&gt;
                                  &lt;/asp:TextBox&gt;
                              &lt;/td&gt;
  
                              &lt;td rowspan="3"&gt;
                                  &amp;nbsp;&amp;nbsp;
                                  &lt;a class="highlightit" href="javascript:actLogin()" tabindex="3"&gt;
                                      &lt;img border="0" src="images/login/botonLogin.gif"&gt;
                                  &lt;/a&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
  
                          &lt;tr&gt;
                              &lt;td align="right" class="letras"&gt;
                                  CLAVE:
                              &lt;/td&gt;
  
                              &lt;td&gt;
                                  &lt;asp:TextBox runat="server" CssClass="cajas" ID="tbxPassword" TextMode="Password" OnKeyPress="ValidarEnter(this)" OnTextChanged="tbxPassword_TextChanged"&gt;
                                  &lt;/asp:TextBox&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
  
                  &lt;div style="margin-top: 54px"&gt;
                      &lt;img src="images/login/cajaAzul.gif"&gt;
                  &lt;/div&gt;
  
                  &lt;div style="display: inline; float: left;width:50% " align="center"&gt;
                      &lt;asp:RequiredFieldValidator ID="rfvUsername" runat="server" 
                          CssClass="tA" ErrorMessage="* Escriba su USUARIO"
                          ControlToValidate="tbxUsername"&gt;
                      &lt;/asp:RequiredFieldValidator&gt;
  
                      &lt;br&gt;
  
                      &lt;asp:RequiredFieldValidator ID="rfvPassword" runat="server" 
                          CssClass="tA" ErrorMessage="* Escriba su CLAVE"
                          ControlToValidate="tbxPassword"&gt;
                      &lt;/asp:RequiredFieldValidator&gt;
  
                      &lt;br&gt;
  
                      &lt;table &gt;
                          &lt;tr align="center"&gt;
                              &lt;td&gt;
                                  &lt;asp:Label runat="server" ID="lblError" Visible="False"&gt;
                                      &lt;font color="red" class="tA"&gt;
                                          &lt;b&gt;
                                              El USUARIO y CLAVE no coincidieron, trate de nuevo
                                         &lt;/b&gt;
                                      &lt;/font&gt;
                                  &lt;/asp:Label&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div style="display: none"&gt;
                  &lt;input type="button" runat="server" id="btnLogin" value="login" onserverclick="btnLogin_ServerClick"&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm noticing that in this part...</p>
  
  <pre><code>function ValidarEnter(src)
              {
                  if (event.keyCode == "13")
                  {
                      actLogin();
                  }
              }
  </code></pre>
  
  <p>When I debug it on firefox, it just skips it.
  I have already tried to add <code>window.event.keyCode</code>... and also switch "13" with just 13...
  How could I work this around?</p>