title: Simplest javascript function not firing
body: <pre><code>    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="jQueryValidation.Default" %&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
  &lt;script src="Scripts/jquery-1.6.1.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script language="javascript" type="text/javascript"&gt;
      function checkValidity() {
          var container = document.getElementById("toggle");
          alert("uspeh!");
          var inputArray = container.getElementsByTagName("input");
      }
      &lt;/script&gt;   
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div id="toggle"&gt;
          &lt;asp:Label ID="lblName" runat="server" Text="Vnesi ime: "&gt;&lt;/asp:Label&gt;
          &lt;span&gt;&lt;asp:TextBox ID="txtName" runat="server" data-errormessage="Внесете име" data-class="required"&gt;&lt;/asp:TextBox&gt;&lt;/span&gt;
          &lt;br /&gt;
          &lt;asp:Label ID="lblSurname" runat="server" Text="Vnesi prezime: "&gt;&lt;/asp:Label&gt;
          &lt;span&gt;&lt;asp:TextBox ID="txtSurname" runat="server" data-errormessage="Внесете презиме" data-class="required"&gt;&lt;/asp:TextBox&gt;&lt;/span&gt;
          &lt;br /&gt;
          &lt;asp:Label ID="lblNickname" runat="server" Text="Vnesi nadimak: "&gt;&lt;/asp:Label&gt;
          &lt;span&gt;&lt;asp:TextBox ID="txtNickname" runat="server" data-errormessage="Внесете надимак" data-class="required"&gt;&lt;/asp:TextBox&gt;&lt;/span&gt;
          &lt;br /&gt;&lt;br /&gt;
          &lt;asp:Button ID="btnSend" runat="server" Text="Send" 
              OnClientClick="checkValidity(); return false;" onclick="btnSend_Click" /&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <p>Updated.</p>
  
  <p>I have no idea why no pop-up shows up. Any idea? Thanks in advance!</p>