Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1740
JavaScript SelectedIndexChanged does not work
posted

I have a WebDropDown control with multi-select checkbox option enabled.

After writing the SelectedIndexChanged javascript function the checkboxes are not checked at all -

        function selectedIndexChanged(sender, eventArgs) {

            var newItems = eventArgs.getNewSelection();

            var newItemsString = "";

 

            for (i=0;i<newItems.length;i++)

                newItemsString += newItems[i].get_index() + ", ";

            alert(newItemsString);

        }

This is a piece of code that I copied from the samples but it does not work.

Could you somebody please suggest what could be wrong?