简体   繁体   中英

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 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没有提供此类JavaScript事件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM