Hide submit button after server validation
<p>I have found this online:</p>

<pre><code>function submitButtonClick(button) {
        if (typeof (Page_ClientValidate) == 'function') {
            if (Page_ClientValidate() == false) {
                return false;
            }
        }
        button.style.display = 'none';  // disable won't work 
        return true;
    } 
</code></pre>

<p>I am not good with Javascript so I couldn't tell what to change...I have a usercontrol with a few buttons, including a submit button. And they are used on every page of my site. And on some pages I have customvalidators. So when a custom validator doesn't validate, the button is gone and there is nothing left to do. What should I change here for the things to work the way I need? Thanks</p>
