Javascript Event For When CascadingDropdown Finishes Populating?
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开发者_Go百科 when the State DDL finishes populating so that I can do this in JavaScript?
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.
CascadingDropdown provides no such JavaScript event as far as I have seen.
精彩评论