title: How to execute javascript function from code-behind but only after the page loads
body: <p>I've found other solution on how to executes a javascript function from code-behind. The problem is that it firing before the page loads, so I can't add logic to it.</p>
  
  <pre><code>if(result)
  {
     Page.ClientScript.RegisterClientScriptBlock(typeof(Page), 
                                                 "Script", "confirmPwdChange();", true);
  }
  </code></pre>
  
  <p>On the client side</p>
  
  <pre><code>&lt;script&gt;
     confirmPwdChange()
     {
       alert("Password has been successfully changed.");
       //Add more logic here, after user clicks the OK button...
     }
  &lt;/script&gt;
  </code></pre>
  
  <p>No Jquery, if possible.</p>
  
  <p>Thanks for helping.</p>