Hide asp.net panel with validation using Javascript
<p>I need a way to hide/show an asp.net Panel with Validators inside using Javascript.</p>

<p>I have successfully hide a panel using this code below:</p>

<pre><code>function ShowHidePanel(panelId, isShown) {
    var pnl = document.getElementById(panelId);

    if (pnl != null) {
        if (isShown) {
            pnl.style.display = 'block';
        }
        else {
            pnl.style.display = 'none';
        }
    }
}
</code></pre>

<p>I am trying to disable all the validators inside using this code below:</p>

<pre><code>function ToggleValidator(validatorId, enabled) {
    var validator = document.getElementById(validatorId);
    if (validator != null) {
        ValidatorEnable(validator, enabled);
    }
}
</code></pre>

<p>However, even though my panel is hidden, the validation on those validators inside is still firing.</p>

<p>Any thought will be appreciated.</p>
