title: How to use clickonce for html button
body: <p>I am trying to use this javascript for clcik once but I m unable to get results
  can anyone please tell me whats wrong with this script</p>
  
  <pre><code>function clickOnce(btn, msg) {
  // Test if we are doing a validation
  //if (typeof (Page_ClientValidate) == 'function') {
      // if we are doing a validation, return if it's false
      //if (Page_ClientValidate() == false) { return false; }
  //}
  
  // Ensure that the button is not of type "submit"
  if (btn.getAttribute('type') == 'button') {
      // The msg attibute is absolutely optional
      // msg will be the text of the button while it's disabled
      if (!msg || (msg = 'undefined')) { msg = 'Loading...'; }
  
      btn.value = msg;
  
      // The magic :D
      btn.disabled = true;
  }
  
  return true;
  }
  </code></pre>
  
  <p>Can anyone tell me whats wrong with this script</p>