title: Why does ModalPopupExtender not show through javascript?
body: <p>I followed several web resources to understand how to show a popup from client side, and I made this code:</p>
  
  <pre><code>&lt;asp:ImageButton runat="server" ID="btnOk" ImageUrl="imagens/btnAlterar.gif" OnClientClick="btnOkClick()" /&gt;
  
  &lt;asp:LinkButton runat="server" ID="dummyForPopup" Visible="false"/&gt;
  
  &lt;ajaxToolKit:ModalPopupExtender runat="server" BehaviorID="btnOkPopupBehavior" ID="MPXtender" TargetControlID="dummyForPopup"  PopupControlID="pnlUpdateUserModal" BackgroundCssClass="modalBackground" OkControlID="btnCloseRequestUserUpdate" OnOkScript="userUpdReq_onOk()" /&gt;
  
  
  function btnOkClick()
  {
      if(validateAll())
      {
          var behavior = $find('btnOkPopupBehavior');
          if (behavior)
          {
              behavior.show();
          }
          else
          {
              var lblOutput = $get('&lt;%= lblOutput .ClientID %&gt;');
              lblOutput .innerText = 'Couldn't find popup';
          }
      }
  }
  </code></pre>
  
  <p>previously I had the modal popup linked to the ok button, it was working pretty well. Now I need some validation before opening the popup, and this code is not working anylonger =/</p>