Is it possible to bind to the Click event and not use an anonymous function -- I just want to call a named function
<p>I have the following code. The first attempt at binding to click event does not work. The second way does. The first shows the alert "CheckBox1" during Page_Load. The second one shows the alert "CheckBox4" during the proper time -- during clicks.</p>

<pre><code>$(document).ready(function () {
    $(document.getElementById(checkBox1ID)).click( SetCheckBox1State(this.checked) );
    $(document.getElementById(checkBox4ID)).click(function () { SetCheckBox4State(this.checked) });
});

    function SetCheckBox1State(checked) {
    alert("CheckBox2");
    var radNumericTextBox1 = $find(radNumericTextBox1ID);
    var wrapperElement = $get(radNumericTextBox1._wrapperElementID);
    var label = $(wrapperElemenet.getElementsByTagName("label")[0]);

    if (checked) {
        radNumericTextBox1.enable();
        label.addClass("LabelEnabled");
        label.removeClass("LabelDisabled");
    }
    else {
        radNumericTextBox1.disable();
        label.addClass("LabelDisabled");
        label.removeClass("LabelEnabled");
    }
}

function SetCheckBox4State(checked) {
    alert("CheckBox4");
    var radNumericTextBox2 = $find(radNumericTextBox2ID);
    var wrapperElement = $get(radNumericTextBox2._wrapperElementID);
    var label = $(wrapperElemenet.getElementsByTagName("label")[0]);

    if (checked) {
        radNumericTextBox2.enable();
        label.addClass("LabelEnabled");
        label.removeClass("LabelDisabled");
    }
    else {
        radNumericTextBox2.disable();
        label.addClass("LabelDisabled");
        label.removeClass("LabelEnabled");
    }
}
</code></pre>

<p>Am I doing something improper? I'd rather not use an anonymous function...but maybe this just how things work?</p>
