Javascript Event For When CascadingDropdown Finishes Populating?

834 views Asked by At

I have a State DDL and a Country DDL. I have CascadingDropdown controls for each of those DDLs.

When the user selects an entry from the Country DDL, the State dropdown gets populated with the results of a service method call.

I want to disable a submit button while the State dropdown is populating. Is there a way to capture when the State DDL finishes populating so that I can do this in JavaScript?

2

There are 2 answers

0
Tedderz On BEST ANSWER

CascadingDropdown provides no such JavaScript event as far as I have seen.

1
GunnerL3510 On

How are you calling your service method? Both the Microsoft AJAX library and jQuery offer a callback method when you execute an AJAX call. In your javascript function that calls the service, disable the button. Provide a callback to the AJAX call's 'onSuccess' (or whatever it is called) that turns it back on.

Quick article on Microsoft AJAX PageMethods javascript class.

jQuery ajax() method.