title: Textboxes change height and border width after javascript alert
body: <p>I have these textboxes:</p>
  
  <pre><code>&lt;asp:Label ID="lbllastname" runat="server" Text="LastName" 
       CssClass="labels" /&gt;&amp;nbsp;
  &lt;asp:TextBox ID="txtlastname" runat="server" CssClass="texts"
       onkeyup="firstElementPress(event);" TabIndex="3" /&gt;
  &lt;br /&gt;
  &lt;asp:Label ID="lblfirstname" runat="server" Text="FirstName" 
       CssClass="labels" /&gt;&amp;nbsp;
  &lt;asp:TextBox ID="txtfirstname" runat="server" CssClass="texts"
        onkeyup="firstElementPress(event);" TabIndex="4" /&gt;
  &lt;br /&gt;
  &lt;asp:Label ID="lblmi" runat="server" Text="MI" CssClass="labels" /&gt;&amp;nbsp;
  &lt;asp:TextBox ID="txtmi" runat="server" CssClass="texts"
        onkeyup="firstElementPress(event);" TabIndex="5" /&gt;
  &lt;br /&gt;
  &lt;asp:Label ID="lblext" runat="server" Text="Suffix" CssClass="labels" /&gt;&amp;nbsp;
  &lt;asp:TextBox ID="txtext" runat="server" CssClass="texts"
       onkeyup="firstElementPress(event);" TabIndex="6" /&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.labels
  {
      font: bold 10pt Calibri;
      color: Black;
  }
  
  .texts
  {
      border-color: Black;
      border-width: thin;
      height: 16px;
      font: 10pt Calibri;
  }
  </code></pre>
  
  <p>They're fine but if the user encounters the javascript alert when the name already exists, these textboxes lose their height and the border thickens. I have no idea why this is happening.</p>
  
  <p>Here's the code for the alert:</p>
  
  <pre><code>Response.Write("&lt;script&gt;alert('The name you specified already exists!');
                  &lt;/script&gt;");
  </code></pre>
  
  <p>Why is this happening? I don't think it has something to do with the javascript on the <code>onkeyup</code> event. Or maybe it does? IDK. It just places the focus on different controls.</p>
  
  <p>In any case, here's the Javascript for it:</p>
  
  <pre><code>function firstElementPress(e) {
      if (e.keyCode == 27) {
          document.getElementById('fuso').focus();
      }
      if (e.keyCode == 17) {
          document.getElementById('txtso').focus();
      }
  }
  </code></pre>
  
  <p>I wish someone would explain to me why this happens. Thanks!</p>