tags:

views:

14

answers:

0

I have a 2 dropdown lists and when a user selects a certain option "a" in dropdown 1,then fields 1 and fields2 are to be filled in but then if changes this to option "b" on dropdown 1, then fields 1 should be blanked out. At the moment my jQuery change handler on dropdown 1, has a set of jQuery sub calls ...

 $("#bc [id$=_dpName]").change(function() {
            if (this.value == '3') {
                $("#bc .pnl").show();
                ResetTextBoxes();
            }
            else {
                $("#bc .pnl").hide();
            }
            ShowHidePanel1();
            ShowHidePanel2();
            ShowHidePanel3();
            ShowHidePanel4();
        })

Is this the right way for cross dependencies or is there a better way to chain all these calls together?