title: Calling multiple JavaScript functions on a button click
body: <p>How to call multiple functions on button click event?</p>
  
  <p>Here is my button,</p>
  
  <pre><code>&lt;asp:LinkButton
      ID="LbSearch"
      runat="server"
      CssClass="regular"
      onclick="LbSearch_Click"
      OnClientClick="return validateView();ShowDiv1();"&gt;
  </code></pre>
  
  <p>But my <code>ShowDiv1</code> doesn't get called...</p>
  
  <p>My JavaScript functions:</p>
  
  <pre><code>function ShowDiv1() {
      document.getElementById("ReportDiv").style.display = 'block';
      return false;
  }
  
  function validateView() {
  
      if (document.getElementById("ctl00_ContentPlaceHolder1_DLCategory").selectedIndex == 0) {
          document.getElementById("ctl00_ContentPlaceHolder1_ErrorMsg").innerHTML = "Please Select Your Category";
          document.getElementById("ctl00_ContentPlaceHolder1_DLCategory").focus();
          return false;
      }
      if (document.getElementById("ctl00_ContentPlaceHolder1_DLEmpName").selectedIndex == 0) {
          document.getElementById("ctl00_ContentPlaceHolder1_ErrorMsg").innerHTML = "Please Select Your Employee Name";
          document.getElementById("ctl00_ContentPlaceHolder1_DLEmpName").focus();
          return false;
      }
      return true;
  }
  </code></pre>
  
  <p>If the <code>ValidateView()</code> function returns true I should call <code>ShowDiv1()</code>.</p>